public String getResourcePath() { return getResourceDir() + "/" + uuid + ".snapshot"; }
public String getResourceDir() { if (Strings.isNullOrEmpty(tableName)) { return getOldResourceDir(signature); } else { return getResourceDir(tableName); } }
public List<SnapshotTable> getSnapshots(String tableName, TableSignature sourceTableSignature) throws IOException { List<SnapshotTable> result = Lists.newArrayList(); String tableSnapshotsPath = SnapshotTable.getResourceDir(tableName); ResourceStore store = TableMetadataManager.getInstance(this.config).getStore(); result.addAll(store.getAllResources(tableSnapshotsPath, SnapshotTableSerializer.INFO_SERIALIZER)); if (sourceTableSignature != null) { String oldTableSnapshotsPath = SnapshotTable.getOldResourceDir(sourceTableSignature); result.addAll(store.getAllResources(oldTableSnapshotsPath, SnapshotTableSerializer.INFO_SERIALIZER)); } return result; }
private String checkDupByContent(SnapshotTable snapshot) throws IOException { ResourceStore store = getStore(); String resourceDir = snapshot.getResourceDir(); NavigableSet<String> existings = store.listResources(resourceDir); if (existings == null) return null; for (String existing : existings) { SnapshotTable existingTable = load(existing, true); // skip cache, direct load from store if (existingTable != null && existingTable.equals(snapshot)) return existing; } return null; }
private String checkDupByInfo(SnapshotTable snapshot) throws IOException { ResourceStore store = getStore(); String resourceDir = snapshot.getResourceDir(); NavigableSet<String> existings = store.listResources(resourceDir); if (existings == null) return null; TableSignature sig = snapshot.getSignature(); for (String existing : existings) { SnapshotTable existingTable = load(existing, false); // skip cache, // direct load from store if (existingTable != null && sig.equals(existingTable.getSignature())) return existing; } return null; }
private String checkDupByContent(SnapshotTable snapshot) throws IOException { ResourceStore store = MetadataManager.getInstance(this.config).getStore(); String resourceDir = snapshot.getResourceDir(); ArrayList<String> existings = store.listResources(resourceDir); if (existings == null) return null; for (String existing : existings) { SnapshotTable existingTable = load(existing, true); // skip cache, direct load from store if (existingTable != null && existingTable.equals(snapshot)) return existing; } return null; }
private String checkDupByInfo(SnapshotTable snapshot) throws IOException { ResourceStore store = MetadataManager.getInstance(this.config).getStore(); String resourceDir = snapshot.getResourceDir(); ArrayList<String> existings = store.listResources(resourceDir); if (existings == null) return null; TableSignature sig = snapshot.getSignature(); for (String existing : existings) { SnapshotTable existingTable = load(existing, false); // skip cache, // direct // load from // store if (existingTable != null && sig.equals(existingTable.getSignature())) return existing; } return null; }
public String getResourcePath() { return getResourceDir() + "/" + uuid + ".snapshot"; }
public String getResourceDir() { if (Strings.isNullOrEmpty(tableName)) { return getOldResourceDir(signature); } else { return getResourceDir(tableName); } }
public List<SnapshotTable> getSnapshots(String tableName, TableSignature sourceTableSignature) throws IOException { List<SnapshotTable> result = Lists.newArrayList(); String tableSnapshotsPath = SnapshotTable.getResourceDir(tableName); ResourceStore store = TableMetadataManager.getInstance(this.config).getStore(); result.addAll(store.getAllResources(tableSnapshotsPath, SnapshotTableSerializer.INFO_SERIALIZER)); if (sourceTableSignature != null) { String oldTableSnapshotsPath = SnapshotTable.getOldResourceDir(sourceTableSignature); result.addAll(store.getAllResources(oldTableSnapshotsPath, SnapshotTableSerializer.INFO_SERIALIZER)); } return result; }
private String checkDupByContent(SnapshotTable snapshot) throws IOException { ResourceStore store = getStore(); String resourceDir = snapshot.getResourceDir(); NavigableSet<String> existings = store.listResources(resourceDir); if (existings == null) return null; for (String existing : existings) { SnapshotTable existingTable = load(existing, true); // skip cache, direct load from store if (existingTable != null && existingTable.equals(snapshot)) return existing; } return null; }
private String checkDupByContent(SnapshotTable snapshot) throws IOException { ResourceStore store = MetadataManager.getInstance(this.config).getStore(); String resourceDir = snapshot.getResourceDir(); ArrayList<String> existings = store.listResources(resourceDir); if (existings == null) return null; for (String existing : existings) { SnapshotTable existingTable = load(existing, true); // skip cache, direct load from store if (existingTable != null && existingTable.equals(snapshot)) return existing; } return null; }
private String checkDupByInfo(SnapshotTable snapshot) throws IOException { ResourceStore store = getStore(); String resourceDir = snapshot.getResourceDir(); NavigableSet<String> existings = store.listResources(resourceDir); if (existings == null) return null; TableSignature sig = snapshot.getSignature(); for (String existing : existings) { SnapshotTable existingTable = load(existing, false); // skip cache, // direct load from store if (existingTable != null && sig.equals(existingTable.getSignature())) return existing; } return null; }
private String checkDupByInfo(SnapshotTable snapshot) throws IOException { ResourceStore store = MetadataManager.getInstance(this.config).getStore(); String resourceDir = snapshot.getResourceDir(); ArrayList<String> existings = store.listResources(resourceDir); if (existings == null) return null; TableSignature sig = snapshot.getSignature(); for (String existing : existings) { SnapshotTable existingTable = load(existing, false); // skip cache, // direct load from store if (existingTable != null && sig.equals(existingTable.getSignature())) return existing; } return null; }