[ https://issues.apache.org/jira/browse/METRON-860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16115596#comment-16115596 ]
Otto Fowler commented on METRON-860: ------------------------------------ maybe functions that require zookeeper shouldn't load if zookeeper is not loaded? we have the capabilities stuff... > Stellar throws exception when zookeeper quorum is not specified > --------------------------------------------------------------- > > Key: METRON-860 > URL: https://issues.apache.org/jira/browse/METRON-860 > Project: Metron > Issue Type: Bug > Reporter: Michael Miklavcic > > The REPL needs Zookeeper for certain operations. Some functions will fail > with cryptic messages if not provided. We should fix these errors to better > indicate the problem. > [Stellar]>>> ENRICHMENT_GET('user', ip_src_addr, 'enrichment', 't') > [!] Unable to initialize function 'ENRICHMENT_GET' > org.apache.metron.common.dsl.ParseException: Unable to initialize function > 'ENRICHMENT_GET' > at > org.apache.metron.common.stellar.StellarCompiler.initializeFunction(StellarCompiler.java:468) > at > org.apache.metron.common.stellar.StellarCompiler.lambda$exitTransformationFunc$14(StellarCompiler.java:416) > at > org.apache.metron.common.stellar.StellarCompiler$Expression.apply(StellarCompiler.java:82) > at > org.apache.metron.common.stellar.BaseStellarProcessor.parse(BaseStellarProcessor.java:148) > at > org.apache.metron.common.stellar.shell.StellarExecutor.execute(StellarExecutor.java:287) > at > org.apache.metron.common.stellar.shell.StellarShell.executeStellar(StellarShell.java:361) > at > org.apache.metron.common.stellar.shell.StellarShell.handleStellar(StellarShell.java:264) > at > org.apache.metron.common.stellar.shell.StellarShell.execute(StellarShell.java:400) > at org.jboss.aesh.console.AeshProcess.run(AeshProcess.java:53) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.IllegalStateException: Unable to find capability > GLOBAL_CONFIG; it may not be available in your context. > at org.apache.metron.common.dsl.Context.getCapability(Context.java:100) > at org.apache.metron.common.dsl.Context.getCapability(Context.java:90) > at org.apache.metron.common.dsl.Context.getCapability(Context.java:85) > at > org.apache.metron.enrichment.stellar.SimpleHBaseEnrichmentFunctions.getConfig(SimpleHBaseEnrichmentFunctions.java:92) > at > org.apache.metron.enrichment.stellar.SimpleHBaseEnrichmentFunctions.access$100(SimpleHBaseEnrichmentFunctions.java:45) > at > org.apache.metron.enrichment.stellar.SimpleHBaseEnrichmentFunctions$EnrichmentGet.initialize(SimpleHBaseEnrichmentFunctions.java:259) > at > org.apache.metron.common.stellar.StellarCompiler.initializeFunction(StellarCompiler.java:464) > ... 11 more > And then entering it again... > [Stellar]>>> ENRICHMENT_GET('user', ip_src_addr, 'enrichment', 't') > [!] java.lang.NullPointerException > org.apache.metron.guava.enrichment.util.concurrent.UncheckedExecutionException: > java.lang.NullPointerException > at > org.apache.metron.guava.enrichment.cache.LocalCache$Segment.get(LocalCache.java:2256) > at > org.apache.metron.guava.enrichment.cache.LocalCache.get(LocalCache.java:3980) > at > org.apache.metron.guava.enrichment.cache.LocalCache$LocalManualCache.get(LocalCache.java:4783) > at > org.apache.metron.enrichment.stellar.SimpleHBaseEnrichmentFunctions$EnrichmentGet.apply(SimpleHBaseEnrichmentFunctions.java:234) > at > org.apache.metron.common.stellar.StellarCompiler.lambda$exitTransformationFunc$14(StellarCompiler.java:420) > at > org.apache.metron.common.stellar.StellarCompiler$Expression.apply(StellarCompiler.java:82) > at > org.apache.metron.common.stellar.BaseStellarProcessor.parse(BaseStellarProcessor.java:148) > at > org.apache.metron.common.stellar.shell.StellarExecutor.execute(StellarExecutor.java:287) > at > org.apache.metron.common.stellar.shell.StellarShell.executeStellar(StellarShell.java:361) > at > org.apache.metron.common.stellar.shell.StellarShell.handleStellar(StellarShell.java:264) > at > org.apache.metron.common.stellar.shell.StellarShell.execute(StellarShell.java:400) > at org.jboss.aesh.console.AeshProcess.run(AeshProcess.java:53) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.NullPointerException > at > org.apache.metron.enrichment.stellar.SimpleHBaseEnrichmentFunctions$EnrichmentGet.lambda$apply$0(SimpleHBaseEnrichmentFunctions.java:235) > at > org.apache.metron.guava.enrichment.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4786) > at > org.apache.metron.guava.enrichment.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3579) > at > org.apache.metron.guava.enrichment.cache.LocalCache$Segment.loadSync(LocalCache.java:2372) > at > org.apache.metron.guava.enrichment.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2335) > at > org.apache.metron.guava.enrichment.cache.LocalCache$Segment.get(LocalCache.java:2250) > ... 14 more -- This message was sent by Atlassian JIRA (v6.4.14#64029)