osx上hortonworks沙盒上的spring xd

eivnm1vs  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(339)

我正在尝试使用xd singlenode和xd shell将spring xd流存储到hortonworks沙盒2.0版。hortonworkshadoop hdfs中没有创建xd目录,也没有存储流。
环境:apple osx 10.9.3,hortonworks沙盒运行在oracle virtualbox(red hat 64位)中,使用桥接模式联网。我在wifi路由器中为virtualbox mac地址分配了一个固定的ip地址(192.168.178.30)。当我使用osx safari浏览到192.168.178.30:8000时,我可以使用hortonworks菜单,如文件浏览器、pig、蜂蜡(hive)等。hortonworks菜单中的“检查错误配置”将导致:

Configuration files located in /etc/hue/conf.empty 
All OK. Configuration check passed.

我用自制软件安装了springxd。我在osx中更改了/usr/local/cellar/springxd/1.0.0.m6/libexec/xd/config/servers.yml文件以包括


# Hadoop properties

spring:
  hadoop:
   fsUri: hdfs://192.168.178.30:8020


# Zookeeper properties

# client connect string: host1:port1,host2:port2,...,hostN:portN

zk:
  client:
     connect: 192.168.178.30:2181

在virtualbox中,我更改了文件/etc/hadoop/conf.empty/hadoop-env.sh以包括:

export HADOOP_OPTS="${HADOOP_OPTS} -Djava.security.krb5.realm= -Djava.security.krb5.kdc="

export HADOOP_OPTS="${HADOOP_OPTS} -Djava.security.krb5.conf=/dev/null"

我使用以下命令启动带有osx的spring xd:

./xd-singlenode --hadoopDistro hadoop22

在第二个osx终端中:

./xd-shell --hadoopDistro hadoop22

在xd shell中输入:

hadoop config fs --namenode hdfs://192.168.178.30:8020

xd shell中的“hadoop fs ls/”命令将导致:

Hadoop configuration changed, re-initializing shell...
2014-06-24 00:55:56.632 java[7804:5d03] Unable to load realm info from SCDynamicStore
00:55:56,672  WARN Spring Shell util.NativeCodeLoader:62 - Unable to load native-hadoop     library for your platform... using builtin-java classes where applicable
Found 6 items
drwxrwxrwt   - yarn   hadoop          0 2013-10-21 00:19 /app-logs
drwxr-xr-x   - hdfs   hdfs            0 2013-10-21 00:08 /apps
drwxr-xr-x   - mapred hdfs            0 2013-10-21 00:10 /mapred
drwxr-xr-x   - hdfs   hdfs            0 2013-10-21 00:10 /mr-history
drwxrwxrwx   - hdfs   hdfs            0 2013-10-28 16:34 /tmp
drwxr-xr-x   - hdfs   hdfs            0 2013-10-28 16:34 /user

使用命令创建spring xd流时

stream create --name twvoetbal --definition "twittersearch --consumerKey='<mykey>' --consumerSecret='<mysecret>' --query='voetbal' | file" --deploy

然后在osx中创建一个/tmp/xd/output/twvoetbal.out文件。springxd可以工作,包括我的twitter开发者密钥。
使用命令创建spring xd流时

stream create --name twvoetbal --definition "twittersearch --consumerKey='<mykey>' --consumerSecret='<mysecret>' --query='voetbal' | hdfs" --deploy

然后在hadoop hdfs中不创建xd目录和文件。
问题:
如何解决xd shell中的“无法从scdynamicstore加载领域信息”错误?
如何解决“warn spring shell util.nativec”问题odeloader:62 - 无法为您的平台加载本机hadoop库。。。在xd shell中使用内置java类?
我还能做错什么?

vddsk6oq

vddsk6oq1#

警告信息只是噪音-我总是忽略它们。你在沙盒上创建了xd目录吗?您需要给运行xd singlenode的用户创建所需目录的权限。
您可以以root用户身份(密码为hadoop)ssh到沙盒并运行以下操作:

sudo -u hdfs hdfs dfs -mkdir /xd
sudo -u hdfs hdfs dfs -chmod 777 /xd

我们有一个简短的编写程序,用于将hadoop虚拟机与xd结合使用:https://github.com/spring-projects/spring-xd/wiki/using-hadoop-vms-with-spring-xd#hortonworks-沙箱

相关问题