Skip to content

Commit e63faf8

Browse files
committed
METRON-2038 Enrichment Loader Fails When Run as MR Job (nickwallen) closes apache#1358
1 parent ef1ce3c commit e63faf8

File tree

3 files changed

+19
-20
lines changed

3 files changed

+19
-20
lines changed

dependencies_with_url.csv

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ com.google.guava:guava:jar:18.0:compile,ASLv2,
194194
com.google.inject.extensions:guice-servlet:jar:3.0:compile,ASLv2,
195195
com.google.inject:guice:jar:3.0:compile,ASLv2,
196196
com.googlecode.disruptor:disruptor:jar:2.10.4:compile,The Apache Software License, Version 2.0,http://code.google.com/p/disruptor/
197+
com.lmax:disruptor:jar:3.3.0:compile,The Apache Software License, Version 2.0,https://github.com/LMAX-Exchange/disruptor/
197198
com.lmax:disruptor:jar:3.3.2:compile,The Apache Software License, Version 2.0,https://github.com/LMAX-Exchange/disruptor/
198199
com.googlecode.json-simple:json-simple:jar:1.1:compile,The Apache Software License, Version 2.0,http://code.google.com/p/json-simple/
199200
com.googlecode.json-simple:json-simple:jar:1.1.1:compile,The Apache Software License, Version 2.0,http://code.google.com/p/json-simple/
@@ -301,6 +302,10 @@ org.jboss.resteasy:resteasy-jaxrs:jar:3.0.1.Final:compile,ASLv2,
301302
org.joda:joda-convert:jar:1.2:compile,Apache 2,http://joda-convert.sourceforge.net
302303
org.mortbay.jetty:jetty-util:jar:6.1.26:compile,ASLv2,
303304
org.mortbay.jetty:jetty:jar:6.1.26:compile,ASLv2,
305+
org.mortbay.jetty:jetty-sslengine:jar:6.1.26:compile,ASLv2,
306+
org.mortbay.jetty:jsp-2.1:jar:6.1.14:compile,ASLv2,
307+
org.mortbay.jetty:jsp-api-2.1:jar:6.1.14:compile,ASLv2,
308+
org.mortbay.jetty:servlet-api-2.5:jar:6.1.14:compile,ASLv2,
304309
org.noggit:noggit:jar:0.6:compile,Apache License, Version 2.0,http://github.com/yonik/noggit
305310
org.scannotation:scannotation:jar:1.0.3:compile,Apache License V2.0,http://scannotation.sf.net
306311
org.slf4j:log4j-over-slf4j:jar:1.6.6:compile,Apache Software Licenses,http://www.slf4j.org
@@ -498,4 +503,4 @@ joda-time:joda-time:jar:2.10:compile
498503
org.elasticsearch:securesm:jar:1.2:compile
499504
com.github.stephenc.jcip:jcip-annotations:jar:1.0-1:compile,ASLv2,http://stephenc.github.io/jcip-annotations/
500505
com.nimbusds:nimbus-jose-jwt:jar:4.41.2:compile,ASLv2,https://bitbucket.org/connect2id/nimbus-jose-jwt/wiki/Home
501-
506+
tomcat:jasper-compiler:jar:5.5.23:compile,ASLv2,https://tomcat.apache.org/

metron-platform/metron-data-management/pom.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@
186186
<artifactId>hadoop-common</artifactId>
187187
</exclusion>
188188
</exclusions>
189-
<scope>provided</scope>
190189
</dependency>
191190
<dependency>
192191
<groupId>org.apache.hbase</groupId>
@@ -210,7 +209,6 @@
210209
<artifactId>hadoop-common</artifactId>
211210
</exclusion>
212211
</exclusions>
213-
<scope>provided</scope>
214212
</dependency>
215213
<dependency>
216214
<groupId>com.opencsv</groupId>
@@ -344,7 +342,6 @@
344342
<scope>test</scope>
345343
</dependency>
346344
</dependencies>
347-
348345
<build>
349346
<plugins>
350347
<plugin>
@@ -380,7 +377,6 @@
380377
</relocation>
381378
</relocations>
382379
<transformers>
383-
<transformer implementation="org.atteo.classindex.ClassIndexTransformer"/>
384380
<transformer
385381
implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
386382
<resources>
@@ -395,6 +391,11 @@
395391
<addHeader>false</addHeader>
396392
<projectName>${project.name}</projectName>
397393
</transformer-->
394+
<!--
395+
ClassIndexTransformer needs to go LAST. For some reason it will clobber other
396+
transformers from operating when it is put first.
397+
-->
398+
<transformer implementation="org.atteo.classindex.ClassIndexTransformer"/>
398399
</transformers>
399400
<artifactSet>
400401
<excludes>
Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
#!/bin/bash
2-
#
2+
#
33
# Licensed to the Apache Software Foundation (ASF) under one
44
# or more contributor license agreements. See the NOTICE file
55
# distributed with this work for additional information
66
# regarding copyright ownership. The ASF licenses this file
77
# to you under the Apache License, Version 2.0 (the
88
# "License"); you may not use this file except in compliance
99
# with the License. You may obtain a copy of the License at
10-
#
10+
#
1111
# http://www.apache.org/licenses/LICENSE-2.0
12-
#
12+
#
1313
# Unless required by applicable law or agreed to in writing, software
1414
# distributed under the License is distributed on an "AS IS" BASIS,
1515
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1616
# See the License for the specific language governing permissions and
1717
# limitations under the License.
18-
#
18+
#
1919

2020
BIGTOP_DEFAULTS_DIR=${BIGTOP_DEFAULTS_DIR-/etc/default}
2121
[ -n "${BIGTOP_DEFAULTS_DIR}" -a -r ${BIGTOP_DEFAULTS_DIR}/hbase ] && . ${BIGTOP_DEFAULTS_DIR}/hbase
@@ -31,21 +31,14 @@ export METRON_VERSION=${project.version}
3131
export METRON_HOME=/usr/metron/$METRON_VERSION
3232
export CLASSNAME="org.apache.metron.dataloads.nonbulk.flatfile.SimpleEnrichmentFlatFileLoader"
3333
export DM_JAR=${project.artifactId}-$METRON_VERSION.jar
34-
export HBASE_HOME=${HBASE_HOME:-/usr/hdp/current/hbase-client}
34+
export HBASE_CONF=${HBASE_CONF:-/etc/hbase/conf}
3535
export HADOOP_OPTS="$HADOOP_OPTS $METRON_JVMFLAGS"
3636
if [ $(which hadoop) ]
3737
then
38-
HADOOP_CLASSPATH=${HBASE_HOME}/lib/hbase-server.jar:`${HBASE_HOME}/bin/hbase classpath`
39-
for jar in $(echo $HADOOP_CLASSPATH | sed 's/:/ /g');do
40-
if [ -f $jar ];then
41-
LIBJARS="$jar,$LIBJARS"
42-
fi
43-
done
44-
export HADOOP_CLASSPATH
45-
hadoop jar $METRON_HOME/lib/$DM_JAR $CLASSNAME -libjars ${LIBJARS} "$@"
38+
export HADOOP_CLASSPATH="$HBASE_CONF"
39+
hadoop jar $METRON_HOME/lib/$DM_JAR $CLASSNAME "$@"
4640
else
4741
echo "Warning: Metron cannot find the hadoop client on this node. This means that loading via Map Reduce will NOT function."
48-
CP=$METRON_HOME/lib/$DM_JAR:/usr/metron/${METRON_VERSION}/lib/taxii-1.1.0.1.jar:`${HBASE_HOME}/bin/hbase classpath`
42+
CP=$METRON_HOME/lib/$DM_JAR:$HBASE_CONF
4943
java $METRON_JVMFLAGS -cp $CP $CLASSNAME "$@"
5044
fi
51-

0 commit comments

Comments
 (0)