我们正在尝试构建一个BI系统,该系统将收集应由其他组件处理的大量数据.
我们认为有一个中间层来收集,存储和分发数据是个好主意.
数据由一组大量日志消息表示.每条日志消息都有:
系统细节:
我们以为Kafka会做这个工作,但我们遇到了几个问题.
我们尝试为每个产品类型和每个产品的分区创建一个主题.通过这样做,我们可以提取1个产品/ 1动作类型来消费.
最初我们遇到"打开文件太多"的问题,但在我们更改服务器配置以支持更多文件后,我们发现内存不足错误(12GB分配/节点)
此外,我们遇到了Kafka稳定性问题.在众多话题中,卡夫卡倾向于冻结.
我们的问题:
我从项目中删除了jar(pdfbox,bouncycastle等)并将它们移动到另一个文件夹但我将它们包含在构建路径中后得到此异常...
在第一行eclipse显示此错误(构造函数PDFParser(InputStream)引用缺少类型InputStream)-altought FileInputStream是从InputStream扩展的 - 我不知道为什么?
FileInputStream in = new FileInputStream(path);
PDFParser parser = new PDFParser(in);
PDFTextStripper textStripper = new PDFTextStripper();
parser.parse();
String text = textStripper.getText(new PDDocument(parser.getDocument()));
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?**
Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problems:
The constructor PDFParser(InputStream) refers to the missing type InputStream
The constructor PDFTextStripper() refers to the missing type IOException
The method parse() from the type PDFParser refers to the missing type IOException
The method getText(PDDocument) from the type PDFTextStripper refers to the missing type …Run Code Online (Sandbox Code Playgroud) 我试图在一个有1500个动态分区的表中插入一些数据,我收到此错误:
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException:
Number of dynamic partitions created is 1500, which is more than 1000.
To solve this try to set hive.exec.max.dynamic.partitions to at least 1500.
Run Code Online (Sandbox Code Playgroud)
所以,我试着:SET hive.exec.max.dynamic.partitions=2048但我仍然得到同样的错误.
如何从Spark更改此值?
码:
this.spark.sql("SET hive.exec.dynamic.partition=true")
this.spark.sql("set hive.exec.dynamic.partition.mode=nonstrict")
this.spark.sql("SET hive.exec.max.dynamic.partitions=2048")
this.spark.sql(
"""
|INSERT INTO processed_data
|PARTITION(event, date)
|SELECT c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,event,date FROM csv_data DISTRIBUTE BY event, date
""".stripMargin
).show()
Run Code Online (Sandbox Code Playgroud)
使用Spark 2.0.0独立模式.谢谢!
我正在尝试从一个表中计算平均值,并将其放入一个新的表中,该表按MySQL中的组名分组.
在第一个表格(称为答案)中,我有许多小组的调查答案.答案是数值(INT,1-7)和问题分为问题小组(文化,表演,等等).所有答案都有一个响应者姓名,他们都属于一个具有*group_id*的组.我想汇总答案并计算所有问题组和group_id分组的平均值.
例如.我们可以假设答案中的数据如下所示:
||respondent | group_id | question_1 | question_2 | question_3| question_4 | question_5 | question_6||
||Joe |1 |4 |3 |5 |4 |2 |2 ||
||Jane |1 |3 |6 |6 |2 |1 |6 ||
||Jones |1 |7 |3 |4 |1 |6 |4 ||
||Harry |2 |2 |2 |3 |7 |5 |3 ||
||Pete |2 |3 |5 |1 |4 |4 |5 ||
||Frank |2 |1 |1 |2 |2 |7 |6 …Run Code Online (Sandbox Code Playgroud) 我的代码将错误Error in mysql syntax放在我插入数据库的代码行上.当我回应插入时,我得到了
INSERT INTO patches (
name,
description,
type,
com1,
com2,
com1,
code,
db,
other,
tfsID,
release,
createdBy,
createdDtTm,
updatedBy,
updatedDtTm
) VALUES (
'testPatch2',
'longPatchDescription',
'Code - Full Build',
'0',
'1',
'1',
'0',
'1',
'1',
'98765',
'6.11.0',
'mhopkins',
'2013/06/26 08:58:19',
'mhopkins',
'2013/06/26 08:58:19'
)
Run Code Online (Sandbox Code Playgroud)
我相信我的语法还可以.但我很困惑为什么我无法获得有关错误的更多数据.思考?
确切的错误
Errormessage: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'release, createdBy, createdDtTm, …Run Code Online (Sandbox Code Playgroud) java ×2
mysql ×2
apache-kafka ×1
apache-spark ×1
bigdata ×1
hive ×1
insert ×1
mysqli ×1
php ×1
syntax-error ×1