List of usage examples for org.apache.hadoop.hdfs.server.namenode CachedBlock.Type toString
@Override
public String toString()
From source file:io.hops.transaction.context.CachedBlockContext.java
License:Apache License
private List<CachedBlock> findByDatanodeAndTypes(CachedBlock.Finder iFinder, Object[] params) throws StorageCallPreventedException, StorageException { final String datanodeId = (String) params[0]; final org.apache.hadoop.hdfs.server.namenode.CachedBlock.Type type = (org.apache.hadoop.hdfs.server.namenode.CachedBlock.Type) params[1]; List<CachedBlock> results = null; if (preventStorageCalls()) { results = getByDatanodeAndType(datanodeId, type.toString()); hit(iFinder, results, "datanodeId", datanodeId, "type", type.toString()); } else {//from w w w . j a v a 2 s.c o m throw new StorageCallPreventedException("[" + iFinder + "] Trying " + "to access storage while it should allways be called after a more general lock"); } return results; }