Tabnine Logo
org.apache.hadoop.hbase.io
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.hadoop.hbase.io

Best Java code snippets using org.apache.hadoop.hbase.io (Showing top 20 results out of 828)

origin: apache/hbase

 @Override
 public boolean accept(Path p) {
  return HFileLink.isHFileLink(p);
 }
}
origin: apache/hbase

/**
 * @param splitRow
 * @return A {@link Reference} that points at top half of a an hfile
 */
public static Reference createTopReference(final byte [] splitRow) {
 return new Reference(splitRow, Range.top);
}
origin: apache/hbase

 @Override
 public int size() {
  return baos.size();
 }
}
origin: apache/hbase

/**
 * @return ImmutableBytesWritable
 *
 * @see org.apache.hadoop.mapred.RecordReader#createKey()
 */
public ImmutableBytesWritable createKey() {
 return new ImmutableBytesWritable();
}
origin: apache/hbase

public void testSpecificCompare() {
 ImmutableBytesWritable ibw1 = new ImmutableBytesWritable(new byte[]{0x0f});
 ImmutableBytesWritable ibw2 = new ImmutableBytesWritable(new byte[]{0x00, 0x00});
 ImmutableBytesWritable.Comparator c = new ImmutableBytesWritable.Comparator();
 assertFalse("ibw1 < ibw2", c.compare( ibw1, ibw2 ) < 0 );
}
origin: apache/hbase

/**
 * @param b Use passed bytes as backing array for this instance.
 */
public void set(final byte [] b) {
 set(b, 0, b.length);
}
origin: apache/hbase

/**
 * Check if this storeFile may contain keys within the TimeRange that
 * have not expired (i.e. not older than oldestUnexpiredTS).
 * @param tr the timeRange to restrict
 * @param oldestUnexpiredTS the oldest timestamp that is not expired, as
 *          determined by the column family's TTL
 * @return false if queried keys definitely don't exist in this StoreFile
 */
boolean passesTimerangeFilter(TimeRange tr, long oldestUnexpiredTS) {
 return this.timeRange == null? true:
  this.timeRange.includesTimeRange(tr) && this.timeRange.getMax() >= oldestUnexpiredTS;
}
origin: apache/hbase

/**
 * Get versions of columns only within the specified timestamp range,
 * [minStamp, maxStamp).
 * @param minStamp minimum timestamp value, inclusive
 * @param maxStamp maximum timestamp value, exclusive
 * @throws IOException
 * @return this for invocation chaining
 */
public Get setTimeRange(long minStamp, long maxStamp) throws IOException {
 tr = new TimeRange(minStamp, maxStamp);
 return this;
}
origin: apache/hbase

 private void initPoolWithAllBuffers(ByteBufferPool pool, int maxBuffersInPool) {
  ByteBuffer[] buffers = new ByteBuffer[maxBuffersInPool];
  // Just call getBuffer() on pool 'maxBuffersInPool' so as to init all buffers and then put back
  // all. Makes pool with max #buffers.
  for (int i = 0; i < maxBuffersInPool; i++) {
   buffers[i] = pool.getBuffer();
  }
  for (ByteBuffer buf : buffers) {
   pool.putbackBuffer(buf);
  }
 }
}
origin: apache/hbase

private void doComparisonsOnObjects(ImmutableBytesWritable a,
                  ImmutableBytesWritable b,
                  int expectedSignum) {
 ImmutableBytesWritable.Comparator comparator =
  new ImmutableBytesWritable.Comparator();
 assertEquals(
  "Comparing " + a + " and " + b + " as objects",
  signum(comparator.compare(a, b)), expectedSignum);
 assertEquals(
  "Comparing " + a + " and " + b + " as objects (inverse)",
  -signum(comparator.compare(b, a)), expectedSignum);
}
origin: apache/hbase

@Override
public OutputStream get(int expectedSize) {
 baos = new ByteBufferOutputStream(expectedSize);
 return baos;
}
origin: apache/hbase

public static final void updateReadLatency(long latencyMillis, boolean pread) {
 if (pread) {
  metrics.updateFsPreadTime(latencyMillis);
 } else {
  metrics.updateFsReadTime(latencyMillis);
 }
}
origin: apache/hbase

public FileLinkInputStream(final FileSystem fs, final FileLink fileLink, int bufferSize)
  throws IOException {
 this.bufferSize = bufferSize;
 this.fileLink = fileLink;
 this.fs = fs;
 this.in = tryOpen();
}
origin: apache/hbase

/**
 * @param originPath Original location of the file to link
 * @param alternativePaths Alternative locations to look for the linked file
 */
public FileLink(Path originPath, Path... alternativePaths) {
 setLocations(originPath, alternativePaths);
}
origin: apache/hbase

/**
 * A constructor that reads files with the latest minor version.
 * This is used by unit tests only.
 */
FSReaderImpl(FSDataInputStream istream, long fileSize, HFileContext fileContext)
throws IOException {
 this(new FSDataInputStreamWrapper(istream), fileSize, null, null, fileContext);
}
origin: apache/hbase

/**
 * Dead simple hfile link constructor
 */
public HFileLink(final Path originPath, final Path tempPath, final Path mobPath,
         final Path archivePath) {
 this.tempPath = tempPath;
 this.originPath = originPath;
 this.mobPath = mobPath;
 this.archivePath = archivePath;
 setLocations(originPath, tempPath, mobPath, archivePath);
}
origin: apache/hbase

 /**
  * @param originPath Path to the wal in the log directory
  * @param archivePath Path to the wal in the archived log directory
  */
 public WALLink(final Path originPath, final Path archivePath) {
  setLocations(originPath, archivePath);
 }
}
origin: apache/hbase

@Override
public void write(int b) {
 checkSizeAndGrow(Bytes.SIZEOF_BYTE);
 buf[this.pos] = (byte) b;
 this.pos++;
}
origin: apache/hbase

public void testComparison() throws Exception {
 runTests("aa", "b", -1);
 runTests("aa", "aa", 0);
 runTests("aa", "ab", -1);
 runTests("aa", "aaa", -1);
 runTests("", "", 0);
 runTests("", "a", -1);
}
origin: apache/hbase

/**
 * @param splitRow
 * @return A {@link Reference} that points at the bottom half of a an hfile
 */
public static Reference createBottomReference(final byte [] splitRow) {
 return new Reference(splitRow, Range.bottom);
}
org.apache.hadoop.hbase.io

Most used classes

  • ImmutableBytesWritable
    A byte sequence that is usable as a key or value. Based on org.apache.hadoop.io.BytesWritable only t
  • Compression$Algorithm
    Compression algorithms. The ordinal of these cannot change or else you risk breaking all existing HF
  • TimeRange
    Represents an interval of version timestamps. Presumes timestamps between #INITIAL_MIN_TIMESTAMP and
  • DataBlockEncoding
    Provide access to all data block encoding algorithms. All of the algorithms are required to have uni
  • HFile$Reader
    An interface used by clients to open and iterate an HFile.
  • CacheConfig,
  • Cipher,
  • Encryption,
  • HFileScanner,
  • HFileContext,
  • HFileLink,
  • ByteArrayOutputStream,
  • Compression,
  • HFile$Writer,
  • ByteBuffInputStream,
  • ByteBufferListOutputStream,
  • ByteBufferOutputStream,
  • Encryption$Context,
  • ThrottledInputStream
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now