Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here. Want to know more about what has changed? Check out the Community News blog.

Flume: kudu-sink java.lang.NoSuchMethodError

Flume: kudu-sink java.lang.NoSuchMethodError

Contributor

Hello,

 

I'm trying to use the Kudu Sink but I'm getting this error when I start Flume:

 

 

Unhandled error
java.lang.NoSuchMethodError: org.apache.flume.Context.getSubProperties(Ljava/lang/String;)Lorg/apache/kudu/shaded/com/google/common/collect/ImmutableMap;
	at org.apache.kudu.flume.sink.KuduSink.configure(KuduSink.java:226)
	at org.apache.flume.conf.Configurables.configure(Configurables.java:41)
	at org.apache.flume.node.AbstractConfigurationProvider.loadSinks(AbstractConfigurationProvider.java:411)
	at org.apache.flume.node.AbstractConfigurationProvider.getConfiguration(AbstractConfigurationProvider.java:102)
	at org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:141)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)

 

 

This is my software versions:

 

 

Flume NG1.6.0+cdh5.13.0+169
Kudu Sinkkudu-flume-sink-1.8.1-SNAPSHOT.jar
Kudu1.5.0+cdh5.13.0+0

 

Also, I tried adding this:

 

<relocation>
    <pattern>com.google.common</pattern>
    <shadedPattern>org.apache.kudu.shaded.com.google.common</shadedPattern>
    <excludes>
        <exclude>com.google.common.collect.ImmutableMap*</exclude>
        <exclude>com.google.common.collect.ImmutableEnumMap*</exclude>
    </excludes>
</relocation>

To the pom.xml (KUDU-2241), but didn't work and I had the same error.

 

Regards,

 

Silva

 

 

1 REPLY 1
Highlighted

Re: Flume: kudu-sink java.lang.NoSuchMethodError

Contributor

UP

 

I'm adding the Flume conf:

 

 

tier1.sources  = source1
tier1.channels = channel1
tier1.sinks    = sink1

# For each source, channel, and sink, set
# standard properties.
#Source
tier1.sources.source1.channels=channel1
tier1.sources.source1.type=exec
tier1.sources.source1.command=/root/flume-source.sh

#Channel
tier1.channels.channel1.type = memory
tier1.channels.channel1.capacity = 10000
tier1.channels.channel1.transactionCapacity = 1000

#Sink
tier1.sinks.sink1.type = org.apache.flume.sink.kudu.KuduSink
tier1.sinks.sink1.masterAddresses = localhost
tier1.sinks.sink1.tableName = stats
tier1.sinks.sink1.channel = channel1
tier1.sinks.sink1.batchSize = 50
tier1.sinks.sink1.producer = org.apache.kudu.flume.sink.SimpleKuduEventProducer

 

 

 

And the Code of the SimpleKuduEventProducer:

 

https://gist.github.com/JoaquinSV/de9432e8ac0478934d3affdacd463762