Utils$Version
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.apache.hadoop.io.file.tfile.Utils$Version(Showing top 15 results out of 315)

  • Common ways to obtain Utils$Version
private void myMethod () {
Utils$Version u =
  • DataInput in;new Version(in)
  • Smart code suggestions by Codota
}
origin: com.facebook.presto.hadoop/hadoop-cdh4

@Override
public boolean equals(Object other) {
 if (this == other) return true;
 if (!(other instanceof Version)) return false;
 return compareTo((Version) other) == 0;
}
origin: com.facebook.presto.hadoop/hadoop-cdh4

public void write(DataOutput out) throws IOException {
 TFile.API_VERSION.write(out);
 Utils.writeVLong(out, recordCount);
 Utils.writeString(out, strComparator);
}
origin: io.hops/hadoop-common

public TFileMeta(DataInput in) throws IOException {
 version = new Version(in);
 if (!version.compatibleWith(TFile.API_VERSION)) {
  throw new RuntimeException("Incompatible TFile fileVersion.");
 }
 recordCount = Utils.readVLong(in);
 strComparator = Utils.readString(in);
 comparator = makeComparator(strComparator);
}
origin: org.apache.apex/malhar-library

public TFileMeta(DataInput in) throws IOException {
 version = new Version(in);
 if (!version.compatibleWith(DTFile.API_VERSION)) {
  throw new RuntimeException("Incompatible TFile fileVersion.");
 }
 recordCount = Utils.readVLong(in);
 strComparator = Utils.readString(in);
 comparator = makeComparator(strComparator);
}
origin: io.hops/hadoop-common

 /**
  * Dumping the TFile information.
  * 
  * @param args
  *          A list of TFile paths.
  */
 public static void main(String[] args) {
  System.out.printf("TFile Dumper (TFile %s, BCFile %s)%n", TFile.API_VERSION
    .toString(), BCFile.API_VERSION.toString());
  if (args.length == 0) {
   System.out
     .println("Usage: java ... org.apache.hadoop.io.file.tfile.TFile tfile-path [tfile-path ...]");
   System.exit(0);
  }
  Configuration conf = new Configuration();

  for (String file : args) {
   System.out.println("===" + file + "===");
   try {
    TFileDumper.dumpInfo(file, System.out, conf);
   } catch (IOException e) {
    e.printStackTrace(System.err);
   }
  }
 }
}
origin: io.hops/hadoop-common

@Override
public boolean equals(Object other) {
 if (this == other) return true;
 if (!(other instanceof Version)) return false;
 return compareTo((Version) other) == 0;
}
origin: org.apache.apex/malhar-library

public void write(DataOutput out) throws IOException {
 DTFile.API_VERSION.write(out);
 Utils.writeVLong(out, recordCount);
 Utils.writeString(out, strComparator);
}
origin: com.facebook.hadoop/hadoop-core

@Override
public boolean equals(Object other) {
 if (this == other) return true;
 if (!(other instanceof Version)) return false;
 return compareTo((Version) other) == 0;
}
origin: com.facebook.hadoop/hadoop-core

public void write(DataOutput out) throws IOException {
 TFile.API_VERSION.write(out);
 Utils.writeVLong(out, recordCount);
 Utils.writeString(out, strComparator);
}
origin: apache/apex-malhar

public void write(DataOutput out) throws IOException {
 DTFile.API_VERSION.write(out);
 Utils.writeVLong(out, recordCount);
 Utils.writeString(out, strComparator);
}
origin: apache/apex-malhar

public TFileMeta(DataInput in) throws IOException {
 version = new Version(in);
 if (!version.compatibleWith(DTFile.API_VERSION)) {
  throw new RuntimeException("Incompatible TFile fileVersion.");
 }
 recordCount = Utils.readVLong(in);
 strComparator = Utils.readString(in);
 comparator = makeComparator(strComparator);
}
origin: io.hops/hadoop-common

public void write(DataOutput out) throws IOException {
 TFile.API_VERSION.write(out);
 Utils.writeVLong(out, recordCount);
 Utils.writeString(out, strComparator);
}
origin: com.facebook.hadoop/hadoop-core

public TFileMeta(DataInput in) throws IOException {
 version = new Version(in);
 if (!version.compatibleWith(TFile.API_VERSION)) {
  throw new RuntimeException("Incompatible TFile fileVersion.");
 }
 recordCount = Utils.readVLong(in);
 strComparator = Utils.readString(in);
 comparator = makeComparator(strComparator);
}
origin: com.facebook.presto.hadoop/hadoop-cdh4

public TFileMeta(DataInput in) throws IOException {
 version = new Version(in);
 if (!version.compatibleWith(TFile.API_VERSION)) {
  throw new RuntimeException("Incompatible TFile fileVersion.");
 }
 recordCount = Utils.readVLong(in);
 strComparator = Utils.readString(in);
 comparator = makeComparator(strComparator);
}
origin: org.apache.apex/malhar-library

 /**
  * Dumping the TFile information.
  *
  * @param args
  *          A list of TFile paths.
  */
 public static void main(String[] args) {
  System.out.printf("TFile Dumper (TFile %s, BCFile %s)\n", DTFile.API_VERSION
    .toString(), DTBCFile.API_VERSION.toString());
  if (args.length == 0) {
   System.out
     .println("Usage: java ... com.datatorrent.contrib.hdht.tfile.withcache.TFile tfile-path [tfile-path ...]");
   System.exit(0);
  }
  Configuration conf = new Configuration();

  for (String file : args) {
   System.out.println("===" + file + "===");
   try {
    TFileDumper.dumpInfo(file, System.out, conf);
   } catch (IOException e) {
    e.printStackTrace(System.err);
   }
  }
 }
}
org.apache.hadoop.io.file.tfileUtils$Version

Javadoc

A generic Version class. We suggest applications built on top of TFile use this class to maintain version information in their meta blocks. A version number consists of a major version and a minor version. The suggested usage of major and minor version number is to increment major version number when the new storage format is not backward compatible, and increment the minor version otherwise.

Most used methods

  • <init>
    Constructor.
  • compatibleWith
    Test compatibility.
  • size
    Get the size of the serialized Version object.
  • toString
    Return a string representation of the version.
  • write
    Write the objec to a DataOutput. The serialized format of the Version is major version followed by m
  • compareTo
    Compare this version with another version.

Popular classes and methods

  • getSystemService (Context)
  • onCreateOptionsMenu (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • FlowLayout (java.awt)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Path (java.nio.file)
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)