@@ -24,126 +24,19 @@ build() {
2424 sudo echo " source ${GPHOME} /greenplum_path.sh" >> /home/gpadmin/.bashrc
2525
2626 cd /data/hawq/pxf
27- make -j8
27+ # make -j16
28+ make
2829 make install
2930
3031 sudo sed ' s|-pxf|-gpadmin|g' -i ${PXF_HOME} /conf/pxf-env.sh
3132
33+ rm -rf ${PXF_HOME} /conf/pxf-private.classpath
3234 rm -rf ${PXF_HOME} /conf/pxf-log4j.properties
33- cat << EOF >>${PXF_HOME} /conf/pxf-log4j.properties
34- # Licensed to the Apache Software Foundation (ASF) under one
35- # or more contributor license agreements. See the NOTICE file
36- # distributed with this work for additional information
37- # regarding copyright ownership. The ASF licenses this file
38- # to you under the Apache License, Version 2.0 (the
39- # "License"); you may not use this file except in compliance
40- # with the License. You may obtain a copy of the License at
41- #
42- # http://www.apache.org/licenses/LICENSE-2.0
43- #
44- # Unless required by applicable law or agreed to in writing,
45- # software distributed under the License is distributed on an
46- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
47- # KIND, either express or implied. See the License for the
48- # specific language governing permissions and limitations
49- # under the License.
50- log4j.appender.ROLLINGFILE.File=${PXF_HOME} /pxf-service/logs/pxf-service.log
51- log4j.appender.ROLLINGFILE.MaxFileSize=10MB
52- log4j.appender.ROLLINGFILE.MaxBackupIndex=10
53- log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout
54- log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSSS} %p %t %c - %m%n
55- EOF
5635
57- rm -rf ${PXF_HOME} /conf/pxf-private.classpath
58- cat << EOF >>${PXF_HOME} /conf/pxf-private.classpath
59- # Licensed to the Apache Software Foundation (ASF) under one or more
60- # contributor license agreements. See the NOTICE file distributed with
61- # this work for additional information regarding copyright ownership.
62- # The ASF licenses this file to You under the Apache License, Version 2.0
63- # (the "License"); you may not use this file except in compliance with
64- # the License. You may obtain a copy of the License at
65- #
66- # http://www.apache.org/licenses/LICENSE-2.0
67- #
68- # Unless required by applicable law or agreed to in writing, software
69- # distributed under the License is distributed on an "AS IS" BASIS,
70- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
71- # See the License for the specific language governing permissions and
72- # limitations under the License.
73-
74- ##################################################################
75- # This file contains the internal classpaths required to run PXF.
76- # Edit to set the base paths according to your specific package layout
77- # Adding new resources should be done using pxf-public.classpath file.
78- ##################################################################
79-
80- # PXF Configuration
81- /data/hawq-devel/pxf/conf
82-
83- # Hadoop Configuration
84- /usr/hdp/2.5.0.0-1245/hadoop/etc/hadoop
85-
86- # Hive Configuration
87- # hive/conf
88-
89- # Hbase Configuration
90- # base/conf
91-
92- # PXF Libraries
93- /data/hawq-devel/pxf/lib/pxf-hbase-*[0-9].jar
94- /data/hawq-devel/pxf/lib/pxf-hdfs-*[0-9].jar
95- /data/hawq-devel/pxf/lib/pxf-hive-*[0-9].jar
96- /data/hawq-devel/pxf/lib/pxf-json-*[0-9].jar
97- /data/hawq-devel/pxf/lib/pxf-jdbc-*[0-9].jar
98- /data/hawq-devel/pxf/lib/pxf-ignite-*[0-9].jar
99-
100- # Hadoop Libraries
101- /usr/hdp/2.5.0.0-1245/hadoop/client/hadoop-hdfs-*[0-9].jar
102- /usr/hdp/2.5.0.0-1245/hadoop/client/hadoop-mapreduce-client-core-*[0-9].jar
103- /usr/hdp/2.5.0.0-1245/hadoop/client/hadoop-auth-*[0-9].jar
104- /usr/hdp/2.5.0.0-1245/hadoop/client/hadoop-common-*[0-9].jar
105- /usr/hdp/2.5.0.0-1245/hadoop/lib/asm-*[0-9].jar
106- /usr/hdp/2.5.0.0-1245/hadoop/client/avro-*[0-9].jar
107- /usr/hdp/2.5.0.0-1245/hadoop/client/commons-cli-*[0-9].jar
108- /usr/hdp/2.5.0.0-1245/hadoop/client/commons-codec-*[0-9].jar
109- /usr/hdp/2.5.0.0-1245/hadoop/client/commons-collections-*[0-9].jar
110- /usr/hdp/2.5.0.0-1245/hadoop/client/commons-configuration-*[0-9].jar
111- /usr/hdp/2.5.0.0-1245/hadoop/client/commons-io-*[0-9].jar
112- /usr/hdp/2.5.0.0-1245/hadoop/client/commons-lang-*[0-9].jar
113- /usr/hdp/2.5.0.0-1245/hadoop/client/commons-logging-*[0-9].jar
114- /usr/hdp/2.5.0.0-1245/hadoop/client/commons-compress-*[0-9].jar
115- /usr/hdp/2.5.0.0-1245/hadoop/client/guava-*[0-9].jar
116- /usr/hdp/2.5.0.0-1245/hadoop/client/htrace-core*.jar
117- /usr/hdp/2.5.0.0-1245/hadoop/client/jetty-*.jar
118- /usr/hdp/2.5.0.0-1245/hadoop/client/jackson-core-asl-*[0-9].jar
119- /usr/hdp/2.5.0.0-1245/hadoop/client/jackson-mapper-asl-*[0-9].jar
120- /usr/hdp/2.5.0.0-1245/hadoop/lib/jersey-core-*[0-9].jar
121- /usr/hdp/2.5.0.0-1245/hadoop/lib/jersey-server-*[0-9].jar
122- /usr/hdp/2.5.0.0-1245/hadoop/client/log4j-*[0-9].jar
123- /usr/hdp/2.5.0.0-1245/hadoop/client/protobuf-java-*[0-9].jar
124- /usr/hdp/2.5.0.0-1245/hadoop/client/slf4j-api-*[0-9].jar
125- /usr/hdp/2.5.0.0-1245/hadoop/client/gson-*[0-9].jar
126-
127- # Hive Libraries
128- # hive/lib/antlr-runtime*.jar
129- # hive/lib/datanucleus-api-jdo*.jar
130- # hive/lib/datanucleus-core*.jar
131- # hive/lib/hive-exec*.jar
132- # hive/lib/hive-metastore*.jar
133- # hive/lib/jdo-api*.jar
134- # hive/lib/libfb303*.jar
135- # when running on OSx, 1.0.5 or higher version is required
136- # hive/lib/snappy-java*.jar
137-
138- # HBase Libraries
139- # hbase/lib/hbase-client*.jar
140- # hbase/lib/hbase-common*.jar
141- # hbase/lib/hbase-protocol*.jar
142- # hbase/lib/htrace-core*.jar
143- # hbase/lib/netty*.jar
144- # hbase/lib/zookeeper*.jar
145- # hbase/lib/metrics-core*.jar
146- EOF
36+ sudo cp /tmp/pxf-private.classpath ${PXF_HOME} /conf/pxf-private.classpath
37+ sudo cp /tmp/pxf-log4j.properties ${PXF_HOME} /conf/pxf-log4j.properties
38+ sudo sed ' s|pxf\.log\.dir|PXF_HOME|g' -i ${PXF_HOME} /conf/pxf-log4j.properties
39+
14740 echo " Make PXF Done!"
14841}
14942
0 commit comments