public SnapshotTable getSnapshotTable(String resourcePath) throws IOException { try { SnapshotTable r = snapshotCache.get(resourcePath); if (r == null) { r = load(resourcePath, true); snapshotCache.put(resourcePath, r); } return r; } catch (ExecutionException e) { throw new RuntimeException(e.getCause()); } }
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; }
public SnapshotTable getSnapshotTable(String resourcePath) throws IOException { SnapshotTable r = snapshotCache.get(resourcePath); if (r == null) { r = load(resourcePath, true); snapshotCache.put(resourcePath, r); } return r; }
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 SnapshotTable getSnapshotTable(String resourcePath) throws IOException { SnapshotTable r = snapshotCache.get(resourcePath); if (r == null) { r = load(resourcePath, true); snapshotCache.put(resourcePath, r); } return r; }
public SnapshotTable getSnapshotTable(String resourcePath) throws IOException { try { SnapshotTable r = snapshotCache.get(resourcePath); if (r == null) { r = load(resourcePath, true); snapshotCache.put(resourcePath, r); } return r; } catch (ExecutionException e) { throw new RuntimeException(e.getCause()); } }
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; }