public NamespaceInfo getNamespaceInfo() { return new NamespaceInfo( getNamespaceID(), getClusterID(), null, getCTime()); }
public static NamespaceInfo newNamespaceInfo() throws UnknownHostException { return new NamespaceInfo(newNamespaceID(), newClusterID(), newBlockPoolID(), Time.now()); }
@Override public NamespaceInfo getNamespaceInfo() { return new NamespaceInfo( getNamespaceID(), getClusterID(), getBlockPoolID(), getCTime()); }
/** * Version of @see #getNamespaceInfo() that is not protected by a lock. */ NamespaceInfo unprotectedGetNamespaceInfo() { return new NamespaceInfo(getFSImage().getStorage().getNamespaceID(), getClusterId(), getBlockPoolId(), getFSImage().getStorage().getCTime(), getState()); }
public static NamespaceInfo convert(NamespaceInfoProto info) { StorageInfoProto storage = info.getStorageInfo(); return new NamespaceInfo(storage.getNamespceID(), storage.getClusterID(), info.getBlockPoolID(), storage.getCTime(), info.getBuildVersion(), info.getSoftwareVersion(), info.getCapabilities(), convert(info.getState())); }
public Writable newInstance() { return new NamespaceInfo(); } });
private static List<NamespaceInfo> createNamespaceInfos(int num) { List<NamespaceInfo> nsInfos = new ArrayList<NamespaceInfo>(); for (int i = 0; i < num; i++) { String bpid = "bp-" + i; nsInfos.add(new NamespaceInfo(0, CLUSTER_ID, bpid, CTIME, BUILD_VERSION, SOFTWARE_VERSION)); } return nsInfos; }
public static NamespaceInfo newNamespaceInfo() throws UnknownHostException { return new NamespaceInfo(newNamespaceID(), newClusterID(), newBlockPoolID(), 0L); }
public static NamespaceInfo newNamespaceInfo() throws UnknownHostException { return new NamespaceInfo(newNamespaceID(), newClusterID(), newBlockPoolID(), 0L); }
NamespaceInfo getNamespaceInfo() { return new NamespaceInfo(dir.fsImage.getNamespaceID(), dir.fsImage.getCTime(), getDistributedUpgradeVersion()); }
public NamespaceInfo getNamespaceInfo() { return new NamespaceInfo( getNamespaceID(), getClusterID(), getBlockPoolID(), getCTime()); } }
public NamespaceInfo getNamespaceInfo() { return new NamespaceInfo( getNamespaceID(), getClusterID(), getBlockPoolID(), getCTime()); } }
NamespaceInfo getNamespaceInfo() { writeLock(); try { return new NamespaceInfo(dir.fsImage.getNamespaceID(), dir.fsImage.getCTime(), getDistributedUpgradeVersion()); } finally { writeUnlock(); } }
@Test public void testCapabilitiesInited() { NamespaceInfo nsInfo = new NamespaceInfo(); assertTrue( nsInfo.isCapabilitySupported(Capability.STORAGE_BLOCK_REPORT_BUFFERS)); }
@Before public void setUp() throws IOException { Configuration conf = new HdfsConfiguration(); storage = new DataStorage(); nsInfo = new NamespaceInfo(0, CLUSTER_ID, DEFAULT_BPID, CTIME, BUILD_VERSION, SOFTWARE_VERSION); FileUtil.fullyDelete(TEST_DIR); assertTrue("Failed to make test dir.", TEST_DIR.mkdirs()); Mockito.when(mockDN.getConf()).thenReturn(conf); }
/** * Version of @see #getNamespaceInfo() that is not protected by a lock. */ NamespaceInfo unprotectedGetNamespaceInfo() { return new NamespaceInfo(getFSImage().getStorage().getNamespaceID(), getClusterId(), getBlockPoolId(), getFSImage().getStorage().getCTime()); }
public static NamespaceInfo convert(NamespaceInfoProto info) { StorageInfoProto storage = info.getStorageInfo(); return new NamespaceInfo(storage.getNamespceID(), storage.getClusterID(), info.getBlockPoolID(), storage.getCTime(), info.getBuildVersion(), info.getSoftwareVersion(), info.getCapabilities()); }
/** * Version of @see #getNamespaceInfo() that is not protected by a lock. */ NamespaceInfo unprotectedGetNamespaceInfo() { return new NamespaceInfo(getFSImage().getStorage().getNamespaceID(), getClusterId(), getBlockPoolId(), getFSImage().getStorage().getCTime()); }
public static NamespaceInfo convert(NamespaceInfoProto info) { StorageInfoProto storage = info.getStorageInfo(); return new NamespaceInfo(storage.getNamespceID(), storage.getClusterID(), info.getBlockPoolID(), storage.getCTime(), info.getBuildVersion(), info.getSoftwareVersion(), info.getCapabilities()); }
@Test public void testConvertNamespaceInfo() { NamespaceInfo info = new NamespaceInfo(37, "clusterID", "bpID", 2300); NamespaceInfoProto proto = PBHelper.convert(info); NamespaceInfo info2 = PBHelper.convert(proto); compare(info, info2); //Compare the StorageInfo assertEquals(info.getBlockPoolID(), info2.getBlockPoolID()); assertEquals(info.getBuildVersion(), info2.getBuildVersion()); }