小编sam*_*ara的帖子

aws athena - 转换为 json 不返回 json 对象

我有一个 json 对象列表(结果属性),如示例中所示:

    select result   from mytable limit 1
Run Code Online (Sandbox Code Playgroud)

我得到:

[{hop=1, error=null, result=[{x=null, from=192.168.0.1, rtt=0.378, ttl=64, err=null, ittl=null, edst=null, late=null, mtu=null, size=68, flags=null, dstoptsize=null, hbhoptsize=null, icmpext=null}, {x=null, from=192.168.0.1, rtt=0.314, ttl=64, err=null, ittl=null, edst=null, late=null, mtu=null, size=68, flags=null, dstoptsize=null, hbhoptsize=null, icmpext=null}, {x=null, from=192.168.0.1, rtt=0.303, ttl=64, err=null, ittl=null, edst=null, late=null, mtu=null, size=68, flags=null, dstoptsize=null, hbhoptsize=null, icmpext=null}]}, {hop=2, error=null, result=[{x=null, from=71.120.7.1, rtt=8.135, ttl=254, err=null, ittl=null, edst=null, late=null, mtu=null, size=28, flags=null, dstoptsize=null, hbhoptsize=null, icmpext=null}, {x=null, from=71.120.7.1, rtt=0.769, ttl=254, err=null, ittl=null, edst=null, late=null, mtu=null, size=28, …
Run Code Online (Sandbox Code Playgroud)

json amazon-web-services presto amazon-athena

5
推荐指数
1
解决办法
1417
查看次数

使用fxml文件设置anchorPane的内容

我使用手风琴控制.根据标题窗格,我需要将fxml文件加载到anchorPane中.所以我有两个部分:一个用于手风琴,另一个用于anchorPane,根据点击显示内容.

@FXML
private StackPane tmpPane;

@FXML
private void itemMembres(MouseEvent event) throws IOException { 
    tmpPane.getChildren().add((Node)FXMLLoader.load(getClass().getResource("/view/test.fxml")));
}
Run Code Online (Sandbox Code Playgroud)

tmpPane是视图中的anchorPane.

谢谢

javafx javafx-2 fxml

4
推荐指数
1
解决办法
2408
查看次数

aws athena - 通过 json 对象数组创建表

我能否获得在 AWS Athena 上创建表的帮助。对于数据示例:

[{"lts": 150}]
Run Code Online (Sandbox Code Playgroud)

AWS Glue 将架构生成为:

 array (array<struct<lts:int>>)
Run Code Online (Sandbox Code Playgroud)

当我尝试使用 AWS Glue 创建的表来预览表时,出现以下错误:

HIVE_BAD_DATA: Error parsing field value for field 0: org.openx.data.jsonserde.json.JSONObject cannot be cast to org.openx.data.jsonserde.json.JSONArray
Run Code Online (Sandbox Code Playgroud)

消息错误很清楚,但是我找不到问题的根源!

json amazon-web-services amazon-athena aws-glue

2
推荐指数
1
解决办法
5007
查看次数

亚马逊雅典娜 - 从多个表中选择而不加入

我有三张桌子。每个表与其他两个表都有共同的列,在某些属性上有所不同。由于我对 common 属性感兴趣,因此我想发出一个请求以从所有三个表中获取数据。

我需要通过 UNION 从所有三个表中获取项目。在 AWS Athena 中可以吗?

前任:

table1 (att1, att2, att3)
table2 (att1, att2, att_3)
table3 (att1, att2, att3, att4)
Run Code Online (Sandbox Code Playgroud)

目标:从 table1、table2、table3 中获取项目,而无需在同一请求中加入。

sql amazon-web-services presto amazon-athena

2
推荐指数
1
解决办法
8743
查看次数

Java中的继承规则

我对Java基础有疑问。我在每个班级都有s属性。当我使用访问器(getS())时,类的实例获得的s的值不同。这种情况有规定吗?

主要的输出是:

x.s  = One
x.getS()  = Three
Run Code Online (Sandbox Code Playgroud)

类的定义:

package com;

import com.Test1.A;
import com.Test1.B;

public class Test1 
{
    public static class A 
    {
        public static String s = "One";
        public int x = 10;

        public String getS() 
        {
            return this.s;
        }
    }

    public static class B extends A 
    {
        public final String s = "Two";
        public String getS() 
        {
            return this.s;
        }
    }

    public static class C extends B 
    {
        public static int x = …
Run Code Online (Sandbox Code Playgroud)

java inheritance

2
推荐指数
1
解决办法
111
查看次数

Spark-执行器心跳在X毫秒后超时

我的程序从目录中的文件读取数据,这些文件的大小为5 GB。我对这些数据应用了许多功能。我在具有32 GB RAM的虚拟机上作为独立(本地)运行spark。

使用的命令:

bin/spark-submit --class ripeatlasanalysis.AnalyseTraceroute     --master local --driver-memory 30G  SparkExample-lowprints-0.0.5-SNAPSHOT-jar-with-dependencies.jar  1517961600  1518393600 3600 
Run Code Online (Sandbox Code Playgroud)

1517961600 1518393600 3600是jar文件的参数。

有时程序运行时没有错误,有时没有错误,并且得到了错误:

Exception in thread "main" org.apache.spark.SparkException: Job aborted due 
 to stage failure: Task 0 in stage 2.0 failed 1 times, most recent   failure: Lost task 
0.0 in stage 2.0 (TID 119, localhost, executor driver):  
ExecutorLostFailure (executor driver exited caused by one of the running   tasks) 
Reason: Executor heartbeat timed out after 128839 ms
 Driver stacktrace:
   at org.apache.spark.scheduler.DAGScheduler.org$apache$spark$scheduler$DAGSchedule  r$$failJobAndIndependentStages(DAGScheduler.scala:1887)
   at …
Run Code Online (Sandbox Code Playgroud)

apache-spark

0
推荐指数
1
解决办法
2647
查看次数