Java 类org.apache.hadoop.hbase.KeyValue.SplitKeyValue 实例源码

项目:LCIndex-HBase-0.94.16    文件:Result.java   
/**
 * Map of families to all versions of its qualifiers and values.
 * <p>
 * Returns a three level Map of the form:
 * <code>Map&amp;family,Map&lt;qualifier,Map&lt;timestamp,value>>></code>
 * <p>
 * Note: All other map returning methods make use of this map internally.
 * @return map from families to qualifiers to versions
 */
public NavigableMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>> getMap() {
  if(this.familyMap != null) {
    return this.familyMap;
  }
  if(isEmpty()) {
    return null;
  }
  this.familyMap =
    new TreeMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>>
    (Bytes.BYTES_COMPARATOR);
  for(KeyValue kv : this.kvs) {
    SplitKeyValue splitKV = kv.split();
    byte [] family = splitKV.getFamily();
    NavigableMap<byte[], NavigableMap<Long, byte[]>> columnMap =
      familyMap.get(family);
    if(columnMap == null) {
      columnMap = new TreeMap<byte[], NavigableMap<Long, byte[]>>
        (Bytes.BYTES_COMPARATOR);
      familyMap.put(family, columnMap);
    }
    byte [] qualifier = splitKV.getQualifier();
    NavigableMap<Long, byte[]> versionMap = columnMap.get(qualifier);
    if(versionMap == null) {
      versionMap = new TreeMap<Long, byte[]>(new Comparator<Long>() {
        public int compare(Long l1, Long l2) {
          return l2.compareTo(l1);
        }
      });
      columnMap.put(qualifier, versionMap);
    }
    Long timestamp = Bytes.toLong(splitKV.getTimestamp());
    byte [] value = splitKV.getValue();
    versionMap.put(timestamp, value);
  }
  return this.familyMap;
}
项目:IRIndex    文件:Result.java   
/**
 * Map of families to all versions of its qualifiers and values.
 * <p>
 * Returns a three level Map of the form:
 * <code>Map&amp;family,Map&lt;qualifier,Map&lt;timestamp,value>>></code>
 * <p>
 * Note: All other map returning methods make use of this map internally.
 * @return map from families to qualifiers to versions
 */
public NavigableMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>> getMap() {
  if(this.familyMap != null) {
    return this.familyMap;
  }
  if(isEmpty()) {
    return null;
  }
  this.familyMap =
    new TreeMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>>
    (Bytes.BYTES_COMPARATOR);
  for(KeyValue kv : this.kvs) {
    SplitKeyValue splitKV = kv.split();
    byte [] family = splitKV.getFamily();
    NavigableMap<byte[], NavigableMap<Long, byte[]>> columnMap =
      familyMap.get(family);
    if(columnMap == null) {
      columnMap = new TreeMap<byte[], NavigableMap<Long, byte[]>>
        (Bytes.BYTES_COMPARATOR);
      familyMap.put(family, columnMap);
    }
    byte [] qualifier = splitKV.getQualifier();
    NavigableMap<Long, byte[]> versionMap = columnMap.get(qualifier);
    if(versionMap == null) {
      versionMap = new TreeMap<Long, byte[]>(new Comparator<Long>() {
        public int compare(Long l1, Long l2) {
          return l2.compareTo(l1);
        }
      });
      columnMap.put(qualifier, versionMap);
    }
    Long timestamp = Bytes.toLong(splitKV.getTimestamp());
    byte [] value = splitKV.getValue();
    versionMap.put(timestamp, value);
  }
  return this.familyMap;
}
项目:RStore    文件:Result.java   
/**
 * Map of families to all versions of its qualifiers and values.
 * <p>
 * Returns a three level Map of the form:
 * <code>Map&amp;family,Map&lt;qualifier,Map&lt;timestamp,value>>></code>
 * <p>
 * Note: All other map returning methods make use of this map internally.
 * @return map from families to qualifiers to versions
 */
public NavigableMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>> getMap() {
  if(this.familyMap != null) {
    return this.familyMap;
  }
  if(isEmpty()) {
    return null;
  }
  this.familyMap =
    new TreeMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>>
    (Bytes.BYTES_COMPARATOR);
  for(KeyValue kv : this.kvs) {
    SplitKeyValue splitKV = kv.split();
    byte [] family = splitKV.getFamily();
    NavigableMap<byte[], NavigableMap<Long, byte[]>> columnMap =
      familyMap.get(family);
    if(columnMap == null) {
      columnMap = new TreeMap<byte[], NavigableMap<Long, byte[]>>
        (Bytes.BYTES_COMPARATOR);
      familyMap.put(family, columnMap);
    }
    byte [] qualifier = splitKV.getQualifier();
    NavigableMap<Long, byte[]> versionMap = columnMap.get(qualifier);
    if(versionMap == null) {
      versionMap = new TreeMap<Long, byte[]>(new Comparator<Long>() {
        public int compare(Long l1, Long l2) {
          return l2.compareTo(l1);
        }
      });
      columnMap.put(qualifier, versionMap);
    }
    Long timestamp = Bytes.toLong(splitKV.getTimestamp());
    byte [] value = splitKV.getValue();
    versionMap.put(timestamp, value);
  }
  return this.familyMap;
}
项目:HBase-Research    文件:Result.java   
/**
 * Map of families to all versions of its qualifiers and values.
 * <p>
 * Returns a three level Map of the form:
 * <code>Map&amp;family,Map&lt;qualifier,Map&lt;timestamp,value>>></code>
 * <p>
 * Note: All other map returning methods make use of this map internally.
 * @return map from families to qualifiers to versions
 */
public NavigableMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>> getMap() {
  if(this.familyMap != null) {
    return this.familyMap;
  }
  if(isEmpty()) {
    return null;
  }
  this.familyMap =
    new TreeMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>>
    (Bytes.BYTES_COMPARATOR);
  for(KeyValue kv : this.kvs) {
    SplitKeyValue splitKV = kv.split();
    byte [] family = splitKV.getFamily();
    NavigableMap<byte[], NavigableMap<Long, byte[]>> columnMap =
      familyMap.get(family);
    if(columnMap == null) {
      columnMap = new TreeMap<byte[], NavigableMap<Long, byte[]>>
        (Bytes.BYTES_COMPARATOR);
      familyMap.put(family, columnMap);
    }
    byte [] qualifier = splitKV.getQualifier();
    NavigableMap<Long, byte[]> versionMap = columnMap.get(qualifier);
    if(versionMap == null) {
      versionMap = new TreeMap<Long, byte[]>(new Comparator<Long>() {
        public int compare(Long l1, Long l2) {
          return l2.compareTo(l1);
        }
      });
      columnMap.put(qualifier, versionMap);
    }
    Long timestamp = Bytes.toLong(splitKV.getTimestamp());
    byte [] value = splitKV.getValue();
    versionMap.put(timestamp, value);
  }
  return this.familyMap;
}
项目:hbase-0.94.8-qod    文件:Result.java   
/**
 * Map of families to all versions of its qualifiers and values.
 * <p>
 * Returns a three level Map of the form:
 * <code>Map&amp;family,Map&lt;qualifier,Map&lt;timestamp,value>>></code>
 * <p>
 * Note: All other map returning methods make use of this map internally.
 * @return map from families to qualifiers to versions
 */
public NavigableMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>> getMap() {
  if(this.familyMap != null) {
    return this.familyMap;
  }
  if(isEmpty()) {
    return null;
  }
  this.familyMap =
    new TreeMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>>
    (Bytes.BYTES_COMPARATOR);
  for(KeyValue kv : this.kvs) {
    SplitKeyValue splitKV = kv.split();
    byte [] family = splitKV.getFamily();
    NavigableMap<byte[], NavigableMap<Long, byte[]>> columnMap =
      familyMap.get(family);
    if(columnMap == null) {
      columnMap = new TreeMap<byte[], NavigableMap<Long, byte[]>>
        (Bytes.BYTES_COMPARATOR);
      familyMap.put(family, columnMap);
    }
    byte [] qualifier = splitKV.getQualifier();
    NavigableMap<Long, byte[]> versionMap = columnMap.get(qualifier);
    if(versionMap == null) {
      versionMap = new TreeMap<Long, byte[]>(new Comparator<Long>() {
        public int compare(Long l1, Long l2) {
          return l2.compareTo(l1);
        }
      });
      columnMap.put(qualifier, versionMap);
    }
    Long timestamp = Bytes.toLong(splitKV.getTimestamp());
    byte [] value = splitKV.getValue();
    versionMap.put(timestamp, value);
  }
  return this.familyMap;
}
项目:hbase-0.94.8-qod    文件:Result.java   
/**
 * Map of families to all versions of its qualifiers and values.
 * <p>
 * Returns a three level Map of the form:
 * <code>Map&amp;family,Map&lt;qualifier,Map&lt;timestamp,value>>></code>
 * <p>
 * Note: All other map returning methods make use of this map internally.
 * @return map from families to qualifiers to versions
 */
public NavigableMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>> getMap() {
  if(this.familyMap != null) {
    return this.familyMap;
  }
  if(isEmpty()) {
    return null;
  }
  this.familyMap =
    new TreeMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>>
    (Bytes.BYTES_COMPARATOR);
  for(KeyValue kv : this.kvs) {
    SplitKeyValue splitKV = kv.split();
    byte [] family = splitKV.getFamily();
    NavigableMap<byte[], NavigableMap<Long, byte[]>> columnMap =
      familyMap.get(family);
    if(columnMap == null) {
      columnMap = new TreeMap<byte[], NavigableMap<Long, byte[]>>
        (Bytes.BYTES_COMPARATOR);
      familyMap.put(family, columnMap);
    }
    byte [] qualifier = splitKV.getQualifier();
    NavigableMap<Long, byte[]> versionMap = columnMap.get(qualifier);
    if(versionMap == null) {
      versionMap = new TreeMap<Long, byte[]>(new Comparator<Long>() {
        public int compare(Long l1, Long l2) {
          return l2.compareTo(l1);
        }
      });
      columnMap.put(qualifier, versionMap);
    }
    Long timestamp = Bytes.toLong(splitKV.getTimestamp());
    byte [] value = splitKV.getValue();
    versionMap.put(timestamp, value);
  }
  return this.familyMap;
}
项目:DominoHBase    文件:Result.java   
/**
 * Map of families to all versions of its qualifiers and values.
 * <p>
 * Returns a three level Map of the form:
 * <code>Map&amp;family,Map&lt;qualifier,Map&lt;timestamp,value>>></code>
 * <p>
 * Note: All other map returning methods make use of this map internally.
 * @return map from families to qualifiers to versions
 */
public NavigableMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>> getMap() {
  if (this.familyMap != null) {
    return this.familyMap;
  }
  if(isEmpty()) {
    return null;
  }
  this.familyMap = new TreeMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>>(Bytes.BYTES_COMPARATOR);
  for(KeyValue kv : this.kvs) {
    SplitKeyValue splitKV = kv.split();
    byte [] family = splitKV.getFamily();
    NavigableMap<byte[], NavigableMap<Long, byte[]>> columnMap =
      familyMap.get(family);
    if(columnMap == null) {
      columnMap = new TreeMap<byte[], NavigableMap<Long, byte[]>>
        (Bytes.BYTES_COMPARATOR);
      familyMap.put(family, columnMap);
    }
    byte [] qualifier = splitKV.getQualifier();
    NavigableMap<Long, byte[]> versionMap = columnMap.get(qualifier);
    if(versionMap == null) {
      versionMap = new TreeMap<Long, byte[]>(new Comparator<Long>() {
        public int compare(Long l1, Long l2) {
          return l2.compareTo(l1);
        }
      });
      columnMap.put(qualifier, versionMap);
    }
    Long timestamp = Bytes.toLong(splitKV.getTimestamp());
    byte [] value = splitKV.getValue();
    versionMap.put(timestamp, value);
  }
  return this.familyMap;
}
项目:hindex    文件:Result.java   
/**
 * Map of families to all versions of its qualifiers and values.
 * <p>
 * Returns a three level Map of the form:
 * <code>Map&amp;family,Map&lt;qualifier,Map&lt;timestamp,value>>></code>
 * <p>
 * Note: All other map returning methods make use of this map internally.
 * @return map from families to qualifiers to versions
 */
public NavigableMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>> getMap() {
  if(this.familyMap != null) {
    return this.familyMap;
  }
  if(isEmpty()) {
    return null;
  }
  this.familyMap =
    new TreeMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>>
    (Bytes.BYTES_COMPARATOR);
  for(KeyValue kv : this.kvs) {
    SplitKeyValue splitKV = kv.split();
    byte [] family = splitKV.getFamily();
    NavigableMap<byte[], NavigableMap<Long, byte[]>> columnMap =
      familyMap.get(family);
    if(columnMap == null) {
      columnMap = new TreeMap<byte[], NavigableMap<Long, byte[]>>
        (Bytes.BYTES_COMPARATOR);
      familyMap.put(family, columnMap);
    }
    byte [] qualifier = splitKV.getQualifier();
    NavigableMap<Long, byte[]> versionMap = columnMap.get(qualifier);
    if(versionMap == null) {
      versionMap = new TreeMap<Long, byte[]>(new Comparator<Long>() {
        public int compare(Long l1, Long l2) {
          return l2.compareTo(l1);
        }
      });
      columnMap.put(qualifier, versionMap);
    }
    Long timestamp = Bytes.toLong(splitKV.getTimestamp());
    byte [] value = splitKV.getValue();
    versionMap.put(timestamp, value);
  }
  return this.familyMap;
}