0

I have some tables in geomesa, such as MyFeature. I have to verify if it is possible to modify the indices.

I'm trying the following instruction from CLI:

geomesa-accumulo add-attribute-index -u username -p pwd-f MyFeature -c project.mycatalog -a myAttr --coverage full

When I run the above command from CLI, in my geomesa_accumulo home directory, I get the following exception

(blah bla blah my feature schema blah blah blah) java.lang.NoClassDefFoundError: org/apache/commons/text/StringEscapeUtils at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:366) at org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46) at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77) at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at org.parboiled.matchers.FirstOfMatcher.match(FirstOfMatcher.java:41) at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77) at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46) at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77) at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46) at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77) at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at org.parboiled.matchers.FirstOfMatcher.match(FirstOfMatcher.java:41) at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77) at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46) at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77) at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at org.parboiled.matchers.FirstOfMatcher.match(FirstOfMatcher.java:41) at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77) at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46) at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77) at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at org.parboiled.matchers.SequenceMatcher.match(SequenceMatcher.java:46) at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77) at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) at org.parboiled.parserunners.BasicParseRunner.run(BasicParseRunner.java:72) at org.parboiled.parserunners.ReportingParseRunner.runBasicMatch(ReportingParseRunner.java:86) at org.parboiled.parserunners.ReportingParseRunner.run(ReportingParseRunner.java:66) at org.parboiled.scala.parserunners.ReportingParseRunner.run(ReportingParseRunner.scala:34) at org.locationtech.geomesa.utils.geotools.SimpleFeatureSpecParser$.parse(SimpleFeatureSpecParser.scala:38) at org.locationtech.geomesa.utils.geotools.SimpleFeatureSpecParser$.parse(SimpleFeatureSpecParser.scala:28) at org.locationtech.geomesa.utils.geotools.SimpleFeatureTypes$.createType(SimpleFeatureTypes.scala:110) at org.locationtech.geomesa.index.geotools.MetadataBackedDataStore$$anonfun$getSchema$1.apply(MetadataBackedDataStore.scala:185) at org.locationtech.geomesa.index.geotools.MetadataBackedDataStore$$anonfun$getSchema$1.apply(MetadataBackedDataStore.scala:185) at scala.Option.map(Option.scala:146) at org.locationtech.geomesa.index.geotools.MetadataBackedDataStore.getSchema(MetadataBackedDataStore.scala:185) at org.locationtech.geomesa.index.geotools.GeoMesaDataStore.getSchema(GeoMesaDataStore.scala:174) at org.locationtech.geomesa.accumulo.data.AccumuloDataStore.getSchema(AccumuloDataStore.scala:228) at org.locationtech.geomesa.jobs.mapreduce.GeoMesaAccumuloInputFormat.init(GeoMesaAccumuloInputFormat.scala:241) at org.locationtech.geomesa.jobs.mapreduce.GeoMesaAccumuloInputFormat.createRecordReader(GeoMesaAccumuloInputFormat.scala:307) at org.locationtech.geomesa.jobs.mapreduce.GeoMesaAccumuloInputFormat.createRecordReader(GeoMesaAccumuloInputFormat.scala:164) at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.(MapTask.java:521) at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341) at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:177) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1893) at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:171) Caused by: java.lang.NoClassDefFoundError: org/apache/commons/text/StringEscapeUtils at org.locationtech.geomesa.utils.text.BasicParser$$anonfun$singleQuotedString$1$$anonfun$apply$10.apply(BasicParser.scala:49) at org.locationtech.geomesa.utils.text.BasicParser$$anonfun$singleQuotedString$1$$anonfun$apply$10.apply(BasicParser.scala:49) at org.parboiled.scala.rules.Rule$$anonfun$exec$1.apply(Rule.scala:197) at org.parboiled.scala.rules.Rule$$anonfun$exec$1.apply(Rule.scala:193) at org.parboiled.scala.rules.Rule$$anonfun$push$1.apply(Rule.scala:133) at org.parboiled.scala.rules.Rule$$anonfun$push$1.apply(Rule.scala:132) at org.parboiled.scala.rules.Rule$$anon$1.run(Rule.scala:129) at org.parboiled.matchers.ActionMatcher.match(ActionMatcher.java:96) at org.parboiled.parserunners.BasicParseRunner.match(BasicParseRunner.java:77) at org.parboiled.MatcherContext.runMatcher(MatcherContext.java:351) ... 51 more Caused by: java.lang.ClassNotFoundException: org.apache.commons.text.StringEscapeUtils at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 61 more

However, in $geomesa_accumulo_home/lib/ I see the following jar (that shoud contain apache common text):

commons-text-1.4.jar

UPDATE:

If I try with yarn with the following command:

yarn jar /opt/geomesa-accumulo_2.11-2.2.1/lib/geomesa-accumulo-jobs_2.11-2.2.1.jar org.locationtech.geomesa.jobs.index.AttributeIndexJob --geomesa.input.user user --geomesa.input.password pwd --geomesa.input.tableName catalog --geomesa.input.feature FeatureName --geomesa.index.coverage full --geomesa.index.attributes AttributeName

I get the following exception:

Exception in thread "main" java.lang.ClassNotFoundException: org.locationtech.geomesa.jobs.index.AttributeIndexJob
        at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:237)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:158)
1

The error is coming from your distributed yarn classpath. commons-text-1.4 should be added to the libjars argument and distributed with the map reduce job. However, there may be a conflicting version already present on your yarn classpath, so you should check for that. The libjars argument is created using geomesa-accumulo-tools.jar!org/locationtech/geomesa/accumulo/tools/ingest-libjars.list, so verify that hasn't been modified as well.

| improve this answer | |
  • Shall you give an eye to my edit, please? I tried with YARN as well – Peter Apr 11 '19 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.