metron-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (METRON-1916) Stellar Classpath Function Resolver Should Handle ClassNotFoundException
Date Sat, 01 Dec 2018 14:18:00 GMT


ASF GitHub Bot commented on METRON-1916:

Github user ottobackwards commented on the issue:
    So, my main concern here is the state of stellar _after_ loading in this condition.  What
happens if you call a function that failed to load?  What happens if it is nested in a match
or a lambda?
    Right now, it blows up, but when loaded everything is known to be 'ok'.  So this introduces
a new state where we are loaded, but things that were supposed to load ( stellar functions
introduced to the class path ) have failed.
    I'm not sure this is that simple.  Would we _ever_ for example accept this state in the

> Stellar Classpath Function Resolver Should Handle ClassNotFoundException
> ------------------------------------------------------------------------
>                 Key: METRON-1916
>                 URL:
>             Project: Metron
>          Issue Type: Improvement
>            Reporter: Nick Allen
>            Assignee: Nick Allen
>            Priority: Major
> Stellar can be executed in an environment where not all of the dependencies are available
for each of the functions provided in Stellar Common. When this happens, the classpath resolver
blows-up even if you do not use the function that is missing dependencies.
> For example this exception is thrown when not all of the dependencies are available for
the new REST function.  I was only attempting to use STATS_INIT, not the REST function.
> {code:java}
> 2018-11-30 15:47:00 DEBUG BaseFunctionResolver:165 - Resolving Stellar function in class
> 2018-11-30 15:47:00 ERROR DefaultProfileBuilder:302 - Bad 'init' expression: error='Unable
to parse: STATS_INIT() due to: org/apache/http/conn/HttpClientConnectionManager', expr='STATS_INIT()',
profile='profile-with-stats', entity='global', variables-available='[adapter.threatinteladapter.end.ts,
bro_timestamp, ip_dst_port, enrichmentsplitterbolt.splitter.end.ts, enrichmentsplitterbolt.splitter.begin.ts,
adapter.hostfromjsonlistadapter.end.ts, adapter.geoadapter.begin.ts, uid, trans_depth, protocol,
original_string, ip_dst_addr, threatinteljoinbolt.joiner.ts, host, enrichmentjoinbolt.joiner.ts,
adapter.hostfromjsonlistadapter.begin.ts, threatintelsplitterbolt.splitter.begin.ts, ip_src_addr,
user_agent, timestamp, method, request_body_len, uri, tags, source.type, adapter.geoadapter.end.ts,
referrer, threatintelsplitterbolt.splitter.end.ts, adapter.threatinteladapter.begin.ts, ip_src_port,
guid, response_body_len]'
> org.apache.metron.stellar.dsl.ParseException: Unable to parse: STATS_INIT() due to: org/apache/http/conn/HttpClientConnectionManager
> at org.apache.metron.stellar.common.BaseStellarProcessor.createException(
> at org.apache.metron.stellar.common.BaseStellarProcessor.parse(
> at org.apache.metron.stellar.common.DefaultStellarStatefulExecutor.execute(
> at org.apache.metron.stellar.common.DefaultStellarStatefulExecutor.assign(
> at org.apache.metron.profiler.DefaultProfileBuilder.assign(
> at org.apache.metron.profiler.DefaultProfileBuilder.apply(
> at org.apache.metron.profiler.DefaultMessageDistributor.distribute(
> at org.apache.metron.profiler.storm.ProfileBuilderBolt.handleMessage(
> at org.apache.metron.profiler.storm.ProfileBuilderBolt.execute(
> at org.apache.storm.topology.WindowedBoltExecutor$1.onActivation(
> at org.apache.storm.windowing.WindowManager.onTrigger(
> at org.apache.storm.windowing.WatermarkTimeTriggerPolicy.handleWaterMarkEvent(
> at org.apache.storm.windowing.WatermarkTimeTriggerPolicy.track(
> at org.apache.storm.windowing.WindowManager.track(
> at org.apache.storm.windowing.WindowManager.add(
> at
> at java.util.concurrent.Executors$
> at java.util.concurrent.FutureTask.runAndReset(
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(
> at java.util.concurrent.ScheduledThreadPoolExecutor$
> at java.util.concurrent.ThreadPoolExecutor.runWorker(
> at java.util.concurrent.ThreadPoolExecutor$
> at
> Caused by: java.lang.NoClassDefFoundError: org/apache/http/conn/HttpClientConnectionManager
> at java.lang.Class.getDeclaredConstructors0(Native Method)
> at java.lang.Class.privateGetDeclaredConstructors(
> at java.lang.Class.getConstructor0(
> at java.lang.Class.getConstructor(
> at org.apache.metron.stellar.dsl.functions.resolver.BaseFunctionResolver.createFunction(
> at org.apache.metron.stellar.dsl.functions.resolver.BaseFunctionResolver.resolveFunction(
> at org.apache.metron.stellar.dsl.functions.resolver.BaseFunctionResolver.resolveFunctions(
> at$MemoizingSupplier.get(
> at org.apache.metron.stellar.dsl.functions.resolver.BaseFunctionResolver.apply(
> at org.apache.metron.stellar.dsl.functions.resolver.BaseFunctionResolver.apply(
> at org.apache.metron.stellar.common.StellarCompiler.resolveFunction(
> at org.apache.metron.stellar.common.StellarCompiler.lambda$exitTransformationFunc$13(
> at org.apache.metron.stellar.common.StellarCompiler$Expression.apply(
> at org.apache.metron.stellar.common.BaseStellarProcessor.parse(
> ... 21 more{code}
> When this happens the Classpath Function Resolver should allow me to use whichever functions
can be loaded correctly.

This message was sent by Atlassian JIRA

View raw message