Reply
New Contributor
Posts: 4
Registered: ‎08-18-2015

Flume + HDFS sink fails writing to S3 in CDH 5.4.4

Hello,

 

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:
  Location:
    org/apache/hadoop/fs/s3native/Jets3tNativeFileSystemStore.copy(Ljava/lang/String;Ljava/lang/String;)V @155: invokevirtual
  Reason:
    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 }
  Bytecode:
    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:
    same_frame_extended(@65)
    same_frame(@117)
    same_locals_1_stack_item_frame(@162,Object[#139])
    same_frame(@169)

        at org.apache.hadoop.fs.s3native.NativeS3FileSystem.createDefaultStore(NativeS3FileSystem.java:334)
        at org.apache.hadoop.fs.s3native.NativeS3FileSystem.initialize(NativeS3FileSystem.java:324)
        at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2596)
        at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:91)
        at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2630)
        at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2612)
        at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:370)

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? 

 

Best,

Krishnan

Posts: 1,894
Kudos: 433
Solutions: 303
Registered: ‎07-31-2013

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

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.
New Contributor
Posts: 4
Registered: ‎08-18-2015

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

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.

Announcements
New solutions