Java 类org.apache.hadoop.hdfs.protocol.CachePoolStats 实例源码

项目:hadoop    文件:CachePool.java   
/**
 * Get statistics about this CachePool.
 *
 * @return   Cache pool statistics.
 */
private CachePoolStats getStats() {
  return new CachePoolStats.Builder().
      setBytesNeeded(bytesNeeded).
      setBytesCached(bytesCached).
      setBytesOverlimit(getBytesOverlimit()).
      setFilesNeeded(filesNeeded).
      setFilesCached(filesCached).
      build();
}
项目:hadoop    文件:CachePool.java   
/**
 * Returns a CachePoolInfo describing this CachePool based on the permissions
 * of the calling user. Unprivileged users will see only minimal descriptive
 * information about the pool.
 * 
 * @param pc Permission checker to be used to validate the user's permissions,
 *          or null
 * @return CachePoolEntry describing this CachePool
 */
public CachePoolEntry getEntry(FSPermissionChecker pc) {
  boolean hasPermission = true;
  if (pc != null) {
    try {
      pc.checkPermission(this, FsAction.READ);
    } catch (AccessControlException e) {
      hasPermission = false;
    }
  }
  return new CachePoolEntry(getInfo(hasPermission), 
      hasPermission ? getStats() : new CachePoolStats.Builder().build());
}
项目:hadoop    文件:PBHelper.java   
public static CachePoolStatsProto convert(CachePoolStats stats) {
  CachePoolStatsProto.Builder builder = CachePoolStatsProto.newBuilder();
  builder.setBytesNeeded(stats.getBytesNeeded());
  builder.setBytesCached(stats.getBytesCached());
  builder.setBytesOverlimit(stats.getBytesOverlimit());
  builder.setFilesNeeded(stats.getFilesNeeded());
  builder.setFilesCached(stats.getFilesCached());
  return builder.build();
}
项目:hadoop    文件:PBHelper.java   
public static CachePoolStats convert (CachePoolStatsProto proto) {
  CachePoolStats.Builder builder = new CachePoolStats.Builder();
  builder.setBytesNeeded(proto.getBytesNeeded());
  builder.setBytesCached(proto.getBytesCached());
  builder.setBytesOverlimit(proto.getBytesOverlimit());
  builder.setFilesNeeded(proto.getFilesNeeded());
  builder.setFilesCached(proto.getFilesCached());
  return builder.build();
}
项目:aliyun-oss-hadoop-fs    文件:PBHelperClient.java   
public static CachePoolStats convert (CachePoolStatsProto proto) {
  CachePoolStats.Builder builder = new CachePoolStats.Builder();
  builder.setBytesNeeded(proto.getBytesNeeded());
  builder.setBytesCached(proto.getBytesCached());
  builder.setBytesOverlimit(proto.getBytesOverlimit());
  builder.setFilesNeeded(proto.getFilesNeeded());
  builder.setFilesCached(proto.getFilesCached());
  return builder.build();
}
项目:aliyun-oss-hadoop-fs    文件:PBHelperClient.java   
public static CachePoolStatsProto convert(CachePoolStats stats) {
  CachePoolStatsProto.Builder builder = CachePoolStatsProto.newBuilder();
  builder.setBytesNeeded(stats.getBytesNeeded());
  builder.setBytesCached(stats.getBytesCached());
  builder.setBytesOverlimit(stats.getBytesOverlimit());
  builder.setFilesNeeded(stats.getFilesNeeded());
  builder.setFilesCached(stats.getFilesCached());
  return builder.build();
}
项目:aliyun-oss-hadoop-fs    文件:CachePool.java   
/**
 * Get statistics about this CachePool.
 *
 * @return   Cache pool statistics.
 */
private CachePoolStats getStats() {
  return new CachePoolStats.Builder().
      setBytesNeeded(bytesNeeded).
      setBytesCached(bytesCached).
      setBytesOverlimit(getBytesOverlimit()).
      setFilesNeeded(filesNeeded).
      setFilesCached(filesCached).
      build();
}
项目:aliyun-oss-hadoop-fs    文件:CachePool.java   
/**
 * Returns a CachePoolInfo describing this CachePool based on the permissions
 * of the calling user. Unprivileged users will see only minimal descriptive
 * information about the pool.
 * 
 * @param pc Permission checker to be used to validate the user's permissions,
 *          or null
 * @return CachePoolEntry describing this CachePool
 */
public CachePoolEntry getEntry(FSPermissionChecker pc) {
  boolean hasPermission = true;
  if (pc != null) {
    try {
      pc.checkPermission(this, FsAction.READ);
    } catch (AccessControlException e) {
      hasPermission = false;
    }
  }
  return new CachePoolEntry(getInfo(hasPermission), 
      hasPermission ? getStats() : new CachePoolStats.Builder().build());
}
项目:big-c    文件:CachePool.java   
/**
 * Get statistics about this CachePool.
 *
 * @return   Cache pool statistics.
 */
private CachePoolStats getStats() {
  return new CachePoolStats.Builder().
      setBytesNeeded(bytesNeeded).
      setBytesCached(bytesCached).
      setBytesOverlimit(getBytesOverlimit()).
      setFilesNeeded(filesNeeded).
      setFilesCached(filesCached).
      build();
}
项目:big-c    文件:CachePool.java   
/**
 * Returns a CachePoolInfo describing this CachePool based on the permissions
 * of the calling user. Unprivileged users will see only minimal descriptive
 * information about the pool.
 * 
 * @param pc Permission checker to be used to validate the user's permissions,
 *          or null
 * @return CachePoolEntry describing this CachePool
 */
public CachePoolEntry getEntry(FSPermissionChecker pc) {
  boolean hasPermission = true;
  if (pc != null) {
    try {
      pc.checkPermission(this, FsAction.READ);
    } catch (AccessControlException e) {
      hasPermission = false;
    }
  }
  return new CachePoolEntry(getInfo(hasPermission), 
      hasPermission ? getStats() : new CachePoolStats.Builder().build());
}
项目:big-c    文件:PBHelper.java   
public static CachePoolStatsProto convert(CachePoolStats stats) {
  CachePoolStatsProto.Builder builder = CachePoolStatsProto.newBuilder();
  builder.setBytesNeeded(stats.getBytesNeeded());
  builder.setBytesCached(stats.getBytesCached());
  builder.setBytesOverlimit(stats.getBytesOverlimit());
  builder.setFilesNeeded(stats.getFilesNeeded());
  builder.setFilesCached(stats.getFilesCached());
  return builder.build();
}
项目:big-c    文件:PBHelper.java   
public static CachePoolStats convert (CachePoolStatsProto proto) {
  CachePoolStats.Builder builder = new CachePoolStats.Builder();
  builder.setBytesNeeded(proto.getBytesNeeded());
  builder.setBytesCached(proto.getBytesCached());
  builder.setBytesOverlimit(proto.getBytesOverlimit());
  builder.setFilesNeeded(proto.getFilesNeeded());
  builder.setFilesCached(proto.getFilesCached());
  return builder.build();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:CachePool.java   
/**
 * Get statistics about this CachePool.
 *
 * @return   Cache pool statistics.
 */
private CachePoolStats getStats() {
  return new CachePoolStats.Builder().
      setBytesNeeded(bytesNeeded).
      setBytesCached(bytesCached).
      setBytesOverlimit(getBytesOverlimit()).
      setFilesNeeded(filesNeeded).
      setFilesCached(filesCached).
      build();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:CachePool.java   
/**
 * Returns a CachePoolInfo describing this CachePool based on the permissions
 * of the calling user. Unprivileged users will see only minimal descriptive
 * information about the pool.
 * 
 * @param pc Permission checker to be used to validate the user's permissions,
 *          or null
 * @return CachePoolEntry describing this CachePool
 */
public CachePoolEntry getEntry(FSPermissionChecker pc) {
  boolean hasPermission = true;
  if (pc != null) {
    try {
      pc.checkPermission(this, FsAction.READ);
    } catch (AccessControlException e) {
      hasPermission = false;
    }
  }
  return new CachePoolEntry(getInfo(hasPermission), 
      hasPermission ? getStats() : new CachePoolStats.Builder().build());
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBHelper.java   
public static CachePoolStatsProto convert(CachePoolStats stats) {
  CachePoolStatsProto.Builder builder = CachePoolStatsProto.newBuilder();
  builder.setBytesNeeded(stats.getBytesNeeded());
  builder.setBytesCached(stats.getBytesCached());
  builder.setBytesOverlimit(stats.getBytesOverlimit());
  builder.setFilesNeeded(stats.getFilesNeeded());
  builder.setFilesCached(stats.getFilesCached());
  return builder.build();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBHelper.java   
public static CachePoolStats convert (CachePoolStatsProto proto) {
  CachePoolStats.Builder builder = new CachePoolStats.Builder();
  builder.setBytesNeeded(proto.getBytesNeeded());
  builder.setBytesCached(proto.getBytesCached());
  builder.setBytesOverlimit(proto.getBytesOverlimit());
  builder.setFilesNeeded(proto.getFilesNeeded());
  builder.setFilesCached(proto.getFilesCached());
  return builder.build();
}
项目:FlexMap    文件:CachePool.java   
/**
 * Get statistics about this CachePool.
 *
 * @return   Cache pool statistics.
 */
private CachePoolStats getStats() {
  return new CachePoolStats.Builder().
      setBytesNeeded(bytesNeeded).
      setBytesCached(bytesCached).
      setBytesOverlimit(getBytesOverlimit()).
      setFilesNeeded(filesNeeded).
      setFilesCached(filesCached).
      build();
}
项目:FlexMap    文件:CachePool.java   
/**
 * Returns a CachePoolInfo describing this CachePool based on the permissions
 * of the calling user. Unprivileged users will see only minimal descriptive
 * information about the pool.
 * 
 * @param pc Permission checker to be used to validate the user's permissions,
 *          or null
 * @return CachePoolEntry describing this CachePool
 */
public CachePoolEntry getEntry(FSPermissionChecker pc) {
  boolean hasPermission = true;
  if (pc != null) {
    try {
      pc.checkPermission(this, FsAction.READ);
    } catch (AccessControlException e) {
      hasPermission = false;
    }
  }
  return new CachePoolEntry(getInfo(hasPermission), 
      hasPermission ? getStats() : new CachePoolStats.Builder().build());
}
项目:FlexMap    文件:PBHelper.java   
public static CachePoolStatsProto convert(CachePoolStats stats) {
  CachePoolStatsProto.Builder builder = CachePoolStatsProto.newBuilder();
  builder.setBytesNeeded(stats.getBytesNeeded());
  builder.setBytesCached(stats.getBytesCached());
  builder.setBytesOverlimit(stats.getBytesOverlimit());
  builder.setFilesNeeded(stats.getFilesNeeded());
  builder.setFilesCached(stats.getFilesCached());
  return builder.build();
}
项目:FlexMap    文件:PBHelper.java   
public static CachePoolStats convert (CachePoolStatsProto proto) {
  CachePoolStats.Builder builder = new CachePoolStats.Builder();
  builder.setBytesNeeded(proto.getBytesNeeded());
  builder.setBytesCached(proto.getBytesCached());
  builder.setBytesOverlimit(proto.getBytesOverlimit());
  builder.setFilesNeeded(proto.getFilesNeeded());
  builder.setFilesCached(proto.getFilesCached());
  return builder.build();
}
项目:hadoop-on-lustre2    文件:CachePool.java   
/**
 * Get statistics about this CachePool.
 *
 * @return   Cache pool statistics.
 */
private CachePoolStats getStats() {
  return new CachePoolStats.Builder().
      setBytesNeeded(bytesNeeded).
      setBytesCached(bytesCached).
      setBytesOverlimit(getBytesOverlimit()).
      setFilesNeeded(filesNeeded).
      setFilesCached(filesCached).
      build();
}
项目:hadoop-on-lustre2    文件:CachePool.java   
/**
 * Returns a CachePoolInfo describing this CachePool based on the permissions
 * of the calling user. Unprivileged users will see only minimal descriptive
 * information about the pool.
 * 
 * @param pc Permission checker to be used to validate the user's permissions,
 *          or null
 * @return CachePoolEntry describing this CachePool
 */
public CachePoolEntry getEntry(FSPermissionChecker pc) {
  boolean hasPermission = true;
  if (pc != null) {
    try {
      pc.checkPermission(this, FsAction.READ);
    } catch (AccessControlException e) {
      hasPermission = false;
    }
  }
  return new CachePoolEntry(getInfo(hasPermission), 
      hasPermission ? getStats() : new CachePoolStats.Builder().build());
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static CachePoolStatsProto convert(CachePoolStats stats) {
  CachePoolStatsProto.Builder builder = CachePoolStatsProto.newBuilder();
  builder.setBytesNeeded(stats.getBytesNeeded());
  builder.setBytesCached(stats.getBytesCached());
  builder.setBytesOverlimit(stats.getBytesOverlimit());
  builder.setFilesNeeded(stats.getFilesNeeded());
  builder.setFilesCached(stats.getFilesCached());
  return builder.build();
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static CachePoolStats convert (CachePoolStatsProto proto) {
  CachePoolStats.Builder builder = new CachePoolStats.Builder();
  builder.setBytesNeeded(proto.getBytesNeeded());
  builder.setBytesCached(proto.getBytesCached());
  builder.setBytesOverlimit(proto.getBytesOverlimit());
  builder.setFilesNeeded(proto.getFilesNeeded());
  builder.setFilesCached(proto.getFilesCached());
  return builder.build();
}
项目:hadoop    文件:PBHelper.java   
public static CachePoolEntry convert (CachePoolEntryProto proto) {
  CachePoolInfo info = PBHelper.convert(proto.getInfo());
  CachePoolStats stats = PBHelper.convert(proto.getStats());
  return new CachePoolEntry(info, stats);
}
项目:aliyun-oss-hadoop-fs    文件:PBHelperClient.java   
public static CachePoolEntry convert(CachePoolEntryProto proto) {
  CachePoolInfo info = convert(proto.getInfo());
  CachePoolStats stats = convert(proto.getStats());
  return new CachePoolEntry(info, stats);
}
项目:big-c    文件:PBHelper.java   
public static CachePoolEntry convert (CachePoolEntryProto proto) {
  CachePoolInfo info = PBHelper.convert(proto.getInfo());
  CachePoolStats stats = PBHelper.convert(proto.getStats());
  return new CachePoolEntry(info, stats);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:PBHelper.java   
public static CachePoolEntry convert (CachePoolEntryProto proto) {
  CachePoolInfo info = PBHelper.convert(proto.getInfo());
  CachePoolStats stats = PBHelper.convert(proto.getStats());
  return new CachePoolEntry(info, stats);
}
项目:FlexMap    文件:PBHelper.java   
public static CachePoolEntry convert (CachePoolEntryProto proto) {
  CachePoolInfo info = PBHelper.convert(proto.getInfo());
  CachePoolStats stats = PBHelper.convert(proto.getStats());
  return new CachePoolEntry(info, stats);
}
项目:hadoop-on-lustre2    文件:PBHelper.java   
public static CachePoolEntry convert (CachePoolEntryProto proto) {
  CachePoolInfo info = PBHelper.convert(proto.getInfo());
  CachePoolStats stats = PBHelper.convert(proto.getStats());
  return new CachePoolEntry(info, stats);
}