Java 类org.apache.hadoop.hbase.util.JenkinsHash 实例源码

项目:ditb    文件:HRegionInfo.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. First hbase:meta region also
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:LCIndex-HBase-0.94.16    文件:HRegionInfo090x.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. ROOT and first META region also
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:LCIndex-HBase-0.94.16    文件:HRegionInfo.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. ROOT and first META region also 
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:pbase    文件:HRegionInfo.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. First hbase:meta region also
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:HIndex    文件:HRegionInfo.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. First hbase:meta region also
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:IRIndex    文件:HRegionInfo090x.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. ROOT and first META region also
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:IRIndex    文件:HRegionInfo.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. ROOT and first META region also 
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:hbase    文件:RegionInfo.java   
/**
 * @return the encodedName
 */
@InterfaceAudience.Private
static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
    regionName.length - MD5_HEX_LENGTH - 1,
    MD5_HEX_LENGTH);
  } else {
    // old format region name. First hbase:meta region also
    // use this format.EncodedName is the JenkinsHash value.
    HashKey<byte[]> key = new ByteArrayHashKey(regionName, 0, regionName.length);
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(key, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:RStore    文件:HRegionInfo090x.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. ROOT and first META region also
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:RStore    文件:HRegionInfo.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. ROOT and first META region also 
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:PyroDB    文件:HRegionInfo.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. First hbase:meta region also
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:c5    文件:HRegionInfo.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. First hbase:meta region also
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:HBase-Research    文件:HRegionInfo090x.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. ROOT and first META region also
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:HBase-Research    文件:HRegionInfo.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. ROOT and first META region also 
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:hbase-0.94.8-qod    文件:HRegionInfo090x.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. ROOT and first META region also
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:hbase-0.94.8-qod    文件:HRegionInfo.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. ROOT and first META region also 
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:hbase-0.94.8-qod    文件:HRegionInfo090x.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. ROOT and first META region also
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:hbase-0.94.8-qod    文件:HRegionInfo.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. ROOT and first META region also 
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:DominoHBase    文件:HRegionInfo.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. ROOT and first META region also
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:hindex    文件:HRegionInfo090x.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. ROOT and first META region also
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}
项目:hindex    文件:HRegionInfo.java   
/**
 * @param regionName
 * @return the encodedName
 */
public static String encodeRegionName(final byte [] regionName) {
  String encodedName;
  if (hasEncodedName(regionName)) {
    // region is in new format:
    // <tableName>,<startKey>,<regionIdTimeStamp>/encodedName/
    encodedName = Bytes.toString(regionName,
        regionName.length - MD5_HEX_LENGTH - 1,
        MD5_HEX_LENGTH);
  } else {
    // old format region name. ROOT and first META region also 
    // use this format.EncodedName is the JenkinsHash value.
    int hashVal = Math.abs(JenkinsHash.getInstance().hash(regionName,
      regionName.length, 0));
    encodedName = String.valueOf(hashVal);
  }
  return encodedName;
}