Package org.apache.hadoop.hbase.io

Examples of org.apache.hadoop.hbase.io.KeyedData


        newValue.append(originalValue.charAt(i));
      }
     
      // Now set the value to be collected
     
      columns[0] = new KeyedData(column, newValue.toString().getBytes());
      value.set(columns);
     
      output.collect(tKey, value);
    }
View Full Code Here


   * {@inheritDoc}
   */
  public KeyedData[] getRow(final Text regionName, final Text row) throws IOException {
    HRegion region = getRegion(regionName);
    TreeMap<Text, byte[]> map = region.getFull(row);
    KeyedData result[] = new KeyedData[map.size()];
    int counter = 0;
    for (Map.Entry<Text, byte []> es: map.entrySet()) {
      result[counter++] =
        new KeyedData(new HStoreKey(row, es.getKey()), es.getValue());
    }
    return result;
  }
View Full Code Here

          continue;
        }
        if (LOG.isDebugEnabled()) {
          LOG.debug("adding value for key: " + k.toString());
        }
        values.add(new KeyedData(k, val));
      }
      if(values.size() > 0) {
        // Row has something in it. Return the value.
        break;
      }
View Full Code Here

      // start transaction
     
      long xid = m_client.startUpdate(tKey);
     
      for(int i = 0; i < columns.length; i++) {
        KeyedData column = columns[i];
        m_client.put(xid, column.getKey().getColumn(), column.getData());
      }
     
      // end transaction
     
      m_client.commit(xid);
View Full Code Here

          ArrayList<KeyedData> columns = new ArrayList<KeyedData>();

          for(Map.Entry<Text, byte[]> e: m_row.entrySet()) {
            HStoreKey keyCol = new HStoreKey(tKey);
            keyCol.setColumn(e.getKey());
            columns.add(new KeyedData(keyCol, e.getValue()));
          }

          // set the output
          rowVal.set(columns.toArray(new KeyedData[columns.size()]));
        }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.io.KeyedData

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.