一、 Kylin依赖的是Hive和HBase
二、 Kylin启动阶段报错
这是一个3台机器组成的集群,分别为26,27,28
kylin报错信息如下:
Less进入Kylin.out后使用D跳到最后,向上翻阅最近一次的错误信息是:
WARNING: Failed to process JAR [jar:file:/home/hadmin/hadoop/contrib/capacity-scheduler/*.jar!/] for TLD files
java.io.FileNotFoundException: /home/hadmin/hadoop/contrib/capacity-scheduler/*.jar (No such file or directory)
找到hadoop目录下的hadoop-env.sh文件进行修改:
将红框的这段代码注释
对集群同步更改操作:
[root@dscn26 hadoop]# scp hadoop-env.sh 192.168.1.27:/home/hadmin/hadoop/etc/hadoop/ 192.168.1.28:/home/hadmin/hadoop/etc/hadoop/
namenode需要重新启动,不行的话,datanode需要重启
三、 Kylin运行cube时相关的hadoop问题
问题如下:
Got exception: java.net.ConnectException: Call From dscn26/192.168.1.26 to dscn1:39383 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused
需要将dscn1调整过来,
原因就是:(下面是修改后的结果,原本都是dscn1之类的)
[root@dscn26 hadoop]# cat masters
dscn26
dscn27
[root@dscn26 hadoop]# cat slaves
dscn26
dscn27
dscn28
然后同步修改;最后重启datanode和namenode
[root@dscn26 hadoop]# systemctl stop dscs-hadoop-namenode.service
[root@dscn26 hadoop]# systemctl stop dscs-hadoop-datanode.service
[root@dscn26 hadoop]# systemctl start dscs-hadoop-namenode.service
[root@dscn26 hadoop]# systemctl start dscs-hadoop-datanode.service
四、 Hadoop运行自己实例没成功导致cube无法运行的错误
yarn-site.xml中添加以下,以下配置项可能不起作用,要不添加,要不删除后重启试试
mapreduce.framework.name
yarn
mapreduce.jobhistory.address
fireslate.cis.umac.mo:10020
mapreduce.jobhistory.webapp.address
fireslate.cis.umac.mo:19888
yarn.app.mapreduce.am.staging-dir
/user
接着,又把hosts中的127.0.0等删除
然后报错
接着做了如下操作后成功!
在如下文件添加:
[root@dscn26 hadoop]# vim yarn-site.xml
yarn.application.classpath
/home/hadmin/hadoop/etc/*,
/home/hadmin/hadoop/etc/hadoop/*,
/home/hadmin/hadoop/lib/*,
/home/hadmin/hadoop/share/hadoop/common/*,
/home/hadmin/hadoop/share/hadoop/common/lib/*,
/home/hadmin/hadoop/share/hadoop/mapreduce/*,
/home/hadmin/hadoop/share/hadoop/mapreduce/lib/*,
/home/hadmin/hadoop/share/hadoop/hdfs/*,
/home/hadmin/hadoop/share/hadoop/hdfs/lib/*,
/home/hadmin/hadoop/share/hadoop/yarn/*,
/home/hadmin/hadoop/share/hadoop/yarn/lib/*
截图如下:
五、 Kylin由于服务器内存不足导致的Cube创建失败
以公司服务器为例,截图如下:
打开配置文件的截图如下:
接下来,要将这个配置同步到集群中其他装有Kylin的服务器上。
六、 Kylin创建Cube不成功的错误
这个问题导致的原因是,Cube创建的最后字段指定大小导致的,超过了;或者是由于cube创建步骤的操作的错误
七、 Kylin解决内存不足
添加配置文件如下:
yarn.scheduler.minimum-allocation-mb
1024
yarn.scheduler.maximum-allocation-mb
122880
yarn.scheduler.minimum-allocation-vcores
6
yarn.nodemanager.resource.memory-mb
215040
yarn.nodemanager.resource.cpu-vcores
24
[root@dscn26 hadoop]# vi mapred-site.xml
修改如下配置项:
查看当前节点的所有进程:
[root@dscn26 hadoop]# jps
启动HBase的服务
[root@dscn26 ~]# systemctl start dscs-hbase-regionsever.service
八、 针对Kylin版本和HBase下的hadoop相关Jar包版本不一致解决方案
九、 关于Kylin本身时区问题,差8区问题
十、 关于Kylin跑Cube运行时报错
org.apache.hadoop.hbase.io.hfile.CorruptHFileException: Problem reading HFile Trailer from file hdfs://ns/kylin/kylin_metadata/kylin-4c69954d-eb86-4d2d-ab84-e475ed4a1b49/zh_cube_biz_cbank_mi/hfile/F1/5cf1b9b9e73f4f5980e5aa104dd0969d
at org.apache.hadoop.hbase.io.hfile.HFile.pickReaderVersion(HFile.java:488)
at org.apache.hadoop.hbase.io.hfile.HFile.createReader(HFile.java:531)
at org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles.groupOrSplit(LoadIncrementalHFiles.java:606)
at org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles$3.call(LoadIncrementalHFiles.java:523)
at org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles$3.call(LoadIncrementalHFiles.java:521)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: native snappy library not available: this version of libhadoop was built without snappy support.
at org.apache.hadoop.io.compress.SnappyCodec.checkNativeCodeLoaded(SnappyCodec.java:65)
at org.apache.hadoop.io.compress.SnappyCodec.getDecompressorType(SnappyCodec.java:193)
at org.apache.hadoop.io.compress.CodecPool.getDecompressor(CodecPool.java:178)
at org.apache.hadoop.hbase.io.compress.Compression$Algorithm.getDecompressor(Compression.java:327)
at org.apache.hadoop.hbase.io.compress.Compression.decompress(Compression.java:422)
at org.apache.hadoop.hbase.io.encoding.HFileBlockDefaultDecodingContext.prepareDecoding(HFileBlockDefaultDecodingContext.java:91)
at org.apache.hadoop.hbase.io.hfile.HFileBlock.unpack(HFileBlock.java:508)
at org.apache.hadoop.hbase.io.hfile.HFileBlock$AbstractFSReader$1.nextBlock(HFileBlock.java:1295)
at org.apache.hadoop.hbase.io.hfile.HFileBlock$AbstractFSReader$1.nextBlockWithBlockType(HFileBlock.java:1301)
at org.apache.hadoop.hbase.io.hfile.HFileReaderV2.(HFileReaderV2.java:147)
at org.apache.hadoop.hbase.io.hfile.HFileReaderV3.(HFileReaderV3.java:73)
at org.apache.hadoop.hbase.io.hfile.HFile.pickReaderVersion(HFile.java:478)
... 8 more
result code:2
解决方案:
- 可以给hadoop安装snappy
- 参考文件http://kylin.apache.org/docs15/install/advance_settings.html
十一、 关于Kylin跑Cube运行时报错NullPointException
最后解决的办法是,将集群中的一个节点,配置成集群模式,就解决了。猜测是kylin本身的问题,无解