Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Flume + HDFS sink fails writing to S3 in CDH 5.4.4


Flume + HDFS sink fails writing to S3 in CDH 5.4.4

New Contributor



I am experiencing an issue when using Flume to write to S3 in CDH 5.4.4. I get the error below when starting up Flume:


java.lang.VerifyError: Bad type on operand stack
Exception Details:
    org/apache/hadoop/fs/s3native/Jets3tNativeFileSystemStore.copy(Ljava/lang/String;Ljava/lang/String;)V @155: invokevirtual
    Type 'org/jets3t/service/model/S3Object' (current frame, stack[4]) is not assignable to 'org/jets3t/service/model/StorageObject'
  Current Frame:
    bci: @155
    flags: { }
    locals: { 'org/apache/hadoop/fs/s3native/Jets3tNativeFileSystemStore', 'java/lang/String', 'java/lang/String', 'org/jets3t/service/model/S3Object' }
    stack: { 'org/jets3t/service/S3Service', 'java/lang/String', 'java/lang/String', 'java/lang/String', 'org/jets3t/service/model/S3Object', integer }
    0x0000000: b200 fcb9 0190 0100 9900 39b2 00fc bb01
    0x0000010: 5659 b701 5713 0192 b601 5b2b b601 5b13
    0x0000020: 0194 b601 5b2c b601 5b13 0196 b601 5b2a
    0x0000030: b400 7db6 00e7 b601 5bb6 015e b901 9802
    0x0000040: 002a b400 5799 0030 2ab4 0047 2ab4 007d
    0x0000050: 2b01 0101 01b6 019b 4e2a b400 6b09 949e
    0x0000060: 0016 2db6 019c 2ab4 006b 949e 000a 2a2d
    0x0000070: 2cb6 01a0 b1bb 00a0 592c b700 a14e 2d2a
    0x0000080: b400 73b6 00b0 2ab4 0047 2ab4 007d b600
    0x0000090: e72b 2ab4 007d b600 e72d 03b6 01a4 57a7
    0x00000a0: 000a 4e2a 2d2b b700 c7b1
  Exception Handler Table:
    bci [0, 116] => handler: 162
    bci [117, 159] => handler: 162
  Stackmap Table:

        at org.apache.hadoop.fs.s3native.NativeS3FileSystem.createDefaultStore(
        at org.apache.hadoop.fs.s3native.NativeS3FileSystem.initialize(
        at org.apache.hadoop.fs.FileSystem.createFileSystem(
        at org.apache.hadoop.fs.FileSystem.access$200(
        at org.apache.hadoop.fs.FileSystem$Cache.getInternal(
        at org.apache.hadoop.fs.FileSystem$Cache.get(
        at org.apache.hadoop.fs.FileSystem.get(

I have compiled my application against jets3t version 0.6.1, which is included with the CDH Flume distribution, but it looks like this is overwritten by the CDH Hadoop distribution which includes jets3t version 0.9.0. Is there a workaround for this? 





Re: Flume + HDFS sink fails writing to S3 in CDH 5.4.4

Master Guru
Would you be able to compile against the 0.9 version? The jets3t library seems to have changed incompatibly between the two.

Alternatively, why not use the newer S3A URIs instead? These have better/more-direct AMZN support.

Re: Flume HDFS sink fails writing to S3 in CDH 5.4.4

New Contributor
I am compiling against the Flume distribution included with CDH 5.4.4,
which includes jets3t version 0.6.1. I cannot simply compile against 0.9.0
as it's a transitive dependency introduced by Flume. Furthermore, the
runtime classpath when running Flume in CDH 5.4.4 includes both jets3t
0.6.1 (included by Flume) and 0.9.0 (included by Hadoop). Therefore, it's
not so easy to fix this, but I will try using s3a instead.

Don't have an account?
Coming from Hortonworks? Activate your account here