Skip to content

1. 制作 Parcel

NEO4J-COMMUNITY

shell
java -jar validator.jar -p NEO4J-3.5.22/meta/parcel.json
java -jar validator.jar -d NEO4J-3.5.22
tar -zcvf NEO4J-3.5.22-el7.parcel  NEO4J-3.5.22
java -jar validator.jar -f NEO4J-3.5.22-el7.parcel

把生成的 parcel 文件 copy 到 parcels 文件服务器目录 /neo4j/parcels 下。执行如下命令,生成 manifest.json 文件。

shell
python ./make_manifest.py parcels

通过 cat manifest.json 文件,获取 hash 值,生成:NEO4J-3.5.22-el7.parcel.sha

shell
touch NEO4J-3.5.22-el7.parcel.sha
echo "hash" > NEO4J-3.5.22-el7.parcel.sha

2. 准备文件服务器

准备 nginx,或者 jetty、或者 tomcat 配置一个简单的文件服务器,如 nginx:

ini
location /neo4j {
    index   index.html index.htm;
    root    /path;
}

/path 目录下应该有 neo4j/parcels 的目录,这样 通过 http://ip:port/neo4j/parcels/manifest.json 可访问到 manifest.json 文件。

3. 配置CDH

  1. 首先登陆CDH,在菜单 “主机”》“Parcel” 可看到当前绑定的Parcel,点击“添加”

2.在 配置任意位置,点 加号+,添加一条文件服务器上的资源, 添加后“保存”;

  1. 点击右上角“检查新 Parcel”,CDH 会扫描到自定义服务。可 Download、Distribute、Activite 分发到 CDH 集群节点

WARN main:com.cloudera.csd.components.CsdLocalRepository: Skipping [/opt/cloudera/csd/NEO4J-3.5.22.jar]:

组件拉起参数

shell
java -cp /Users/zhenqin/software/neo4j/plugins:/Users/zhenqin/software/neo4j/conf:/Users/zhenqin/software/neo4j/lib/*:/Users/zhenqin/software/neo4j/plugins/*:/Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home/lib/tools.jar -server -Xms1G -Xmx1G -XX:+UseG1GC -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:+UnlockExperimentalVMOptions -XX:+TrustFinalNonStaticFields -XX:+DisableExplicitGC -Djdk.tls.ephemeralDHKeySize=2048 -Djdk.tls.rejectClientInitiatedRenegotiation=true -Dunsupported.dbms.udc.source=tarball -Dfile.encoding=UTF-8 org.neo4j.server.CommunityEntryPoint --home-dir=/Users/zhenqin/software/neo4j --config-dir=/Users/zhenqin/software/neo4j/conf

运行期环境变量

shell
environment=CDH_PARQUET_HOME='/usr/lib/parquet',
CDH_MR2_HOME='/usr/lib/hadoop-mapreduce',
CMF_PACKAGE_DIR='/opt/cloudera/cm-agent/service',
CM_STATUS_CODES='STATUS_NONE HDFS_DFS_DIR_NOT_EMPTY HBASE_TABLE_DISABLED HBASE_TABLE_ENABLED JOBTRACKER_IN_STANDBY_MODE YARN_RM_IN_STANDBY_MODE',
MGMT_HOME='/opt/cloudera/cm',CGROUP_ROOT_CPU='/sys/fs/cgroup/cpu,cpuacct',
CDH_IMPALA_HOME='/usr/lib/impala',CDH_YARN_HOME='/usr/lib/hadoop-yarn',
CGROUP_GROUP_CPU='',CDH_HDFS_HOME='/usr/lib/hadoop-hdfs',
HOME='/var/lib/neo4j',
HADOOP_CREDSTORE_PASSWORD='5zyn01fyqylyie1lspw9xnogd',
PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin',
CDH_HUE_PLUGINS_HOME='/usr/lib/hadoop',
CM_CSD_SCRIPT='scripts/control.sh',
CDH_HADOOP_BIN='/usr/bin/hadoop',
KEYTRUSTEE_KP_HOME='/usr/share/keytrustee-keyprovider',
CDH_KUDU_HOME='/usr/lib/kudu',
CLOUDERA_ORACLE_CONNECTOR_JAR='/usr/share/java/oracle-connector-java.jar',
CONF_DIR='/var/run/cloudera-scm-agent/process/254-neo4j-NEO4J',
CDH_SQOOP2_HOME='/usr/lib/sqoop2',
KEYTRUSTEE_SERVER_HOME='/usr/lib/keytrustee-server',
JSVC_HOME='/usr/libexec/bigtop-utils',
HIVE_DEFAULT_XML='/etc/hive/conf.dist/hive-default.xml',
PORT='8080',
CLOUDERA_POSTGRESQL_JDBC_JAR='/opt/cloudera/cm/lib/postgresql-42.1.4.jre7.jar',
CGROUP_GROUP_CPUACCT='',
CDH_KMS_HOME='/usr/lib/hadoop-kms',
ZK_QUORUM='node1.primeton.com:2181',
CDH_HBASE_HOME='/usr/lib/hbase',
CDH_SQOOP_HOME='/usr/lib/sqoop',
CDH_HCAT_HOME='/usr/lib/hcatalog',
CDH_OOZIE_HOME='/usr/lib/oozie',
CDH_HIVE_HOME='/usr/lib/hive',
CDH_ZOOKEEPER_HOME='/usr/lib/zookeeper',
CDH_HUE_HOME='/usr/lib/hue',
CGROUP_GROUP_DEVICES='',
CGROUP_ROOT_MEMORY='/sys/fs/cgroup/memory',
CLOUDERA_MYSQL_CONNECTOR_JAR='/usr/share/java/mysql-connector-java.jar',
CDH_SPARK_HOME='/usr/lib/spark',
CGROUP_GROUP_MEMORY='',
CDH_MR1_HOME='/usr/lib/hadoop-0.20-mapreduce',
TOMCAT_HOME='/usr/lib/bigtop-tomcat',
CDH_PIG_HOME='/usr/lib/pig',
CDH_SENTRY_HOME='/usr/lib/sentry',
CDH_VERSION='6',
CGROUP_GROUP_BLKIO='',
CGROUP_ROOT_BLKIO='/sys/fs/cgroup/blkio',
CDH_CRUNCH_HOME='/usr/lib/crunch',
CDH_LLAMA_HOME='/usr/lib/llama/',
CDH_HTTPFS_HOME='/usr/lib/hadoop-httpfs',
CDH_HADOOP_HOME='/usr/lib/hadoop',
ORACLE_HOME='/usr/share/oracle/instantclient',
CMF_SERVER_ROOT='/opt/cloudera/cm',
WEBHCAT_DEFAULT_XML='/etc/hive-webhcat/conf.dist/webhcat-default.xml',
CDH_KAFKA_HOME='/usr/lib/kafka',
CGROUP_ROOT_DEVICES='/sys/fs/cgroup/devices',
CDH_HBASE_INDEXER_HOME='/usr/lib/hbase-solr',
CDH_SOLR_HOME='/usr/lib/solr',
CGROUP_ROOT_CPUACCT='/sys/fs/cgroup/cpu,cpuacct',
CDH_FLUME_HOME='/usr/lib/flume-ng'
user=neo4jCloudera CDH 平台、以及大数据相关技术