Examples of CheckSumType


Examples of org.apache.hadoop.hbase.util.ChecksumType

  /**
   * Test to ensure that these is at least one valid checksum implementation
   */
  @Test
  public void testChecksumAlgorithm() throws IOException {
    ChecksumType type = ChecksumType.CRC32;
    assertEquals(ChecksumType.nameToType(type.getName()), type);
    assertEquals(ChecksumType.valueOf(type.toString()), type);
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.ChecksumProto.ChecksumType

    return OpWriteBlockProto.BlockConstructionStage.valueOf(
        stage.name());
  }

  public static ChecksumProto toProto(DataChecksum checksum) {
    ChecksumType type = checksumTypeMap.get(checksum.getChecksumType());
    if (type == null) {
      throw new IllegalArgumentException(
          "Can't convert checksum to protobuf: " + checksum);
    }
View Full Code Here

Examples of org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.ChecksumProto.ChecksumType

    return OpWriteBlockProto.BlockConstructionStage.valueOf(
        stage.name());
  }

  public static ChecksumProto toProto(DataChecksum checksum) {
    ChecksumType type = ChecksumType.valueOf(checksum.getChecksumType().name());
    if (type == null) {
      throw new IllegalArgumentException(
          "Can't convert checksum to protobuf: " + checksum);
    }
View Full Code Here

Examples of voldemort.store.readonly.checksum.CheckSum.CheckSumType

            if(statuses != null) {
                // sort the files so that index files come last. Maybe
                // this will help keep them cached until the swap
                Arrays.sort(statuses, new IndexFileLastComparator());
                byte[] origCheckSum = null;
                CheckSumType checkSumType = CheckSumType.NONE;

                // Do a checksum of checksum - Similar to HDFS
                CheckSum checkSumGenerator = null;
                CheckSum fileCheckSumGenerator = null;
View Full Code Here

Examples of voldemort.store.readonly.checksum.CheckSum.CheckSumType

        Path outputDir = conf.getOutputDir();
        Path inputPath = conf.getInputPath();
        Cluster cluster = conf.getCluster();
        List<StoreDefinition> storeDefs = conf.getStoreDefs();
        String storeName = conf.getStoreName();
        CheckSumType checkSumType = conf.getCheckSumType();
        boolean saveKeys = conf.getSaveKeys();
        boolean reducerPerBucket = conf.getReducerPerBucket();

        StoreDefinition storeDef = null;
        for(StoreDefinition def: storeDefs)
View Full Code Here

Examples of voldemort.store.readonly.checksum.CheckSum.CheckSumType

            if(statuses != null && statuses.length > 0) {
                // sort the files so that index files come last. Maybe
                // this will help keep them cached until the swap
                Arrays.sort(statuses, new IndexFileLastComparator());
                byte[] origCheckSum = null;
                CheckSumType checkSumType = CheckSumType.NONE;

                // Do a checksum of checksum - Similar to HDFS
                CheckSum checkSumGenerator = null;
                CheckSum fileCheckSumGenerator = null;
View Full Code Here

Examples of voldemort.store.readonly.checksum.CheckSum.CheckSumType

                                              props.getString("build.key.selection", null));

        int numChunks = props.getInt("num.chunks." + storeDef.getName(),
                                     props.getInt("num.chunks", -1));

        CheckSumType checkSumType = CheckSum.fromString(props.getString("checksum.type",
                                                                        CheckSum.toString(CheckSumType.MD5)));
        boolean saveKeys = props.getBoolean("save.keys", true);
        boolean reducerPerBucket = props.getBoolean("reducer.per.bucket", false);

        new VoldemortStoreBuilderJob(this.getId() + "-build-store",
View Full Code Here

Examples of voldemort.store.readonly.checksum.CheckSum.CheckSumType

        URI uri = new URI(url);
        Path outputDir = new Path(props.getString("build.output.dir"), uri.getHost());
        Path inputPath = getInputPath();
        String keySelection = props.getString("key.selection", null);
        String valSelection = props.getString("value.selection", null);
        CheckSumType checkSumType = CheckSum.fromString(props.getString("checksum.type",
                                                                        CheckSum.toString(CheckSumType.MD5)));
        boolean saveKeys = props.getBoolean("save.keys", true);
        boolean reducerPerBucket = props.getBoolean("reducer.per.bucket", false);
        int numChunks = props.getInt("num.chunks", -1);
View Full Code Here

Examples of voldemort.store.readonly.checksum.CheckSum.CheckSumType

        if(options.has("force-overwrite")) {
            FileSystem fs = outputDir.getFileSystem(conf);
            fs.delete(outputDir, true);
        }

        CheckSumType checkSumType = CheckSumType.toType(CmdUtils.valueOf(options, "checksum", ""));

        Class[] deps = new Class[] { ImmutableCollection.class, JDOMException.class,
                VoldemortConfig.class, HadoopStoreJobRunner.class, mapperClass };

        addDepJars(conf, deps, addJars);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.