@Test
  public void testGetBucketCodecVersion0() {
    final BucketCodec codec = BucketCodec.getCodec(0);
    assertEquals(BucketCodec.V0, codec);
    assertEquals(0, codec.getVersion());

    // Returns the provided value
    assertEquals(7, codec.decodeWriterId(7));

    // Always returns 0
    assertEquals(0, codec.decodeStatementId(100));
    assertEquals(0, codec.decodeStatementId(-10));

    // Returns the bucket value from Options
    final AcidOutputFormat.Options options = new AcidOutputFormat.Options(null).bucket(7);
    assertEquals(7, codec.encode(options));
  }
Test Bucket Codec version 0. This is the "legacy" version.
ql/src/test/org/apache/hadoop/hive/ql/io/TestBucketCodec.java