Package com.sap.hadoop.ds.streams.Streams

Examples of com.sap.hadoop.ds.streams.Streams.DataOStream


    return j;
  }
 
  private void write(Writable w) throws BaseException, IOException
  {
    DataOStream dos = Streams.dos.get();
    ByteArrayOS bos = dos.getUnderlyingStream();
    bos.reset();
    w.write(dos);
    ensureCapacity(bos.len());
    int i = currentSize * 2;
    System.arraycopy(bos.bytearray(), 0, bytes, bytesUsed, bos.len());
View Full Code Here


  {
    LockUtils.lock(lock.writeLock());
   
    try
    {
      DataOStream dos = Streams.dos.get();
      ByteArrayOS bos = dos.getUnderlyingStream();
      bos.reset();
      key.write(dos);
      int p = splitList.getPartition(bos.bytearray(), 0, bos.len());
      ByteBasedSortedMap mp = bringInMemory(p);
     
View Full Code Here

  {
    fixStartPositions();
    LockUtils.lock(lock.readLock());
    try
    {
      DataOStream dos = Streams.dos.get();
      ByteArrayOS bos = dos.getUnderlyingStream();
      bos.reset();
      w.write(dos);
      int p = splitList.getPartition(bos.bytearray(), 0, bos.len());
      ByteBasedSortedMap mp = partitions.get(p);
      return mp.getIndex(w);
View Full Code Here

  public int getValue(Writable key, Writable value) throws BaseException
  {
    LockUtils.lock(lock.readLock());
    try
    {
      DataOStream dos = Streams.dos.get();
      ByteArrayOS bos = dos.getUnderlyingStream();
      bos.reset();
      key.write(dos);
      int p = splitList.getPartition(bos.bytearray(), 0, bos.len());
      ByteBasedSortedMap mp = partitions.get(p);
      return mp.getValue(key, value);
View Full Code Here

    currentSize += 1;
  }
 
  private int writeKey(Writable w) throws BaseException, IOException
  {
    DataOStream dos = Streams.dos.get();
    ByteArrayOS bos = dos.getUnderlyingStream();
    bos.reset();
    w.write(dos);
    ensureCapacity(bos.len(), true);
    int i = currentSize * 2;
    System.arraycopy(bos.bytearray(), 0, bytes, bytesUsed, bos.len());
View Full Code Here

    {
      valueOffsetsArray[i] = 0;
      valueOffsetsArray[i+1] = 0;
      return;
    }
    DataOStream dos = Streams.dos.get();
    ByteArrayOS bos = dos.getUnderlyingStream();
    bos.reset();
    w.write(dos);
    ensureCapacity(bos.len(), false);
    System.arraycopy(bos.bytearray(), 0, bytes, bytesUsed, bos.len());
    valueOffsetsArray[i] = bytesUsed;
View Full Code Here

  public int getIndex(Writable w) throws BaseException
  {
    LockUtils.lock(lock.readLock());
    try
    {
      DataOStream dos = Streams.dos.get();
      ByteArrayOS bos = dos.getUnderlyingStream();
      bos.reset();
      w.write(dos);
      TempEntryPosition te = new TempEntryPosition(bos.bytearray(), bos.len());
      int posRet[] = position(te);
      int pos = posRet[1];
View Full Code Here

TOP

Related Classes of com.sap.hadoop.ds.streams.Streams.DataOStream

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.