Package org.apache.hadoop.hdfs.server.protocol

Examples of org.apache.hadoop.hdfs.server.protocol.RemoteImage


    // create valid images (possibly with missing md5s
    for (int i = 0; i < iterations; i++) {
      boolean removeMd5 = rand.nextBoolean();
      createImage(txid + i, true, removeMd5);
      // this should be in the manifest later
      expectedImages.add(new RemoteImage(txid + i, removeMd5 ? null : digests
          .get(txid + i)));
    }

    for (int i = 0; i < iterations; i++) {
      createImage(txid + i + iterations, false, false);
View Full Code Here


    @Override
    public void readFields(DataInput in) throws IOException {
      int len = in.readInt();
      images = new ArrayList<RemoteImage>(len);
      for (int i = 0; i < len; i++) {
        RemoteImage rel = new RemoteImage();
        rel.readFields(in);
        images.add(rel);
      }
    }
View Full Code Here

  }

  private RemoteImage createRemoteImage(long txid, boolean hasMd5)
      throws IOException {
    MessageDigest digester = MD5Hash.getDigester();
    return new RemoteImage(txid, hasMd5 ? new MD5Hash(
        digester.digest(getBytes(txid))) : null);
  }
View Full Code Here

        digest = MD5FileUtils.readStoredMd5ForFile(foundImage.getFile());
      } catch (IOException e) {
        LOG.warn("Exception when reading md5 file for image: " + foundImage, e);
      }
      // in case of failure the digest is simply "null"
      results.add(new RemoteImage(foundImage.getCheckpointTxId(), digest));
    }
   
    // sort the images
    Collections.sort(results);
   
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hdfs.server.protocol.RemoteImage

Copyright © 2018 www.massapicom. 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.