本文主要包含cubert,cubert uhd185,cubert gmbh,德国cubert,启闭机安装指南等服务器相关知识,网友希望可以进行参考
LinkedIn Cubert安装指南,linkedincubert
最近工作需要,调研了一下LinkedIn开源的用于复杂大数据分析的高性能计算引擎Cubert。自己测了下,感觉比较适合做报表统计中的Cube计算和Join计算,效率往往比Hive高很多倍,节省资源和时间。
下面看下这个框架的介绍:
Cubert完全用Java开发,并提供一种脚本语言。它是针对报表领域里经常出现的复杂连接和聚合而设计的。Cubert使用MeshJoin算法处理大时间窗口下的大数据集,CPU和内存利用率显著提升。CUBE是Cubert定义的一个新操作符,可以计算累加和非累加分析维度。非累加维度是计算密集型的,如计算一个时间窗口内不同的用户数,但CUBE能加快这些运算,而且还可以计算准确的百分等级,如中位数统计,动态上卷内部维度以及在单个任务中计算多个度量值。
Cubert最适合于重复的报表工作流程,它利用部分结果缓存和增量处理技术来提高速度。最后,一种新的稀疏矩阵乘法算法可以用于大型图的分析计算。
项目地址在:https://github.com/linkedin/Cubert
一、Git Clone
首先Fork到我的github上。然后,
克隆项目
git clone git@github.com:OopsOutOfMemory/Cubert.git ./cubert
配置环境变量:
注意CUBERT_HOME是在cubert/release后bin目录也在release下。
export HADOOP_HOME=/Users/shengli/cloudera/${CDH}/hadoop
export CUBERT_HOME=/Users/shengli/git_repos/cubert/release
二、编译打包:
指定Hadoop的版本号:
vim ./gradle.properties
修改 hadoopVersion=2.5.0
编译打包
Cubert是基于Gradle进行构建的,所以要执行./gradlew来进行编译导报
shengli-mac$ ./gradlew
:genParser
:compileJava
warning: Supported source version 'RELEASE_6' from annotation processor 'org.antlr.v4.runtime.misc.NullUsageProcessor' less than -source '1.8'
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
:processResources UP-TO-DATE
:classes
:jar
:dist
BUILD SUCCESSFUL
cubert包
shengli-mac$ ll release/lib/
total 12488
-rw-r--r-- 1 shengli staff 6392989 Jun 11 14:15 cubert-0.2.21.jar
配置环境变量
将$CUBERT_HOME/bin配置到PATH内,然后:
shengli-mac$ cubert -h
Using HADOOP_CLASSPATH=:/Users/shengli/git_repos/cubert/release/lib/*
usage: ScriptExecutor <cubert script file> [options]
-c,--compile stop after compilation
-d,--debug print debuging information
-D <property=value> use value for given property
-describe describe the schemas of output datasets
-f,--param_file <file> use given parameter file
-h,--help shows this message
-j,--json show the plan in JSON
-p,--parse stop after parsing
-P,--cache_path <lib path> classpath to be uploaded to distributed
cache
-parallel run independent jobs in parallel
-perf enable performance profiling
-s,--preprocess show the script after preprocessing
-x <job id/name> execute this job only
三、Cubert Example
预处理:
shengli-mac$ cat release/examples/word
wordcount.cmr words.txt
shengli-mac$ cat release/examples/wordcount.cmr
PROGRAM "Word Count";
JOB "count words"
REDUCERS 5;
MAP {
data = LOAD "$CUBERT_HOME/examples/words.txt" USING TEXT("schema": "STRING word");
with_count = FROM data GENERATE word, 1L AS count;
}
SHUFFLE with_count PARTITIONED ON word AGGREGATES COUNT(word) AS count;
REDUCE {
counted = GROUP with_count BY word AGGREGATES SUM(count) AS count;
}
STORE counted INTO "output" USING TEXT();
END

