public static long nimbusVersionOfBlob(String key, ClientBlobStore cb) throws AuthorizationException, KeyNotFoundException { long nimbusBlobVersion = 0; ReadableBlobMeta metadata = cb.getBlobMeta(key); nimbusBlobVersion = metadata.get_version(); return nimbusBlobVersion; }
public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SETTABLE: return get_settable(); case VERSION: return get_version(); } throw new java.lang.IllegalStateException(); }
@Override public long getRemoteVersion(ClientBlobStore store) throws KeyNotFoundException, AuthorizationException { if (isLocalMode && type == TopologyBlobType.TOPO_JAR) { LOG.debug("REMOTE VERSION LOCAL JAR {}", LOCAL_MODE_JAR_VERSION); return LOCAL_MODE_JAR_VERSION; } return store.getBlobMeta(type.getKey(topologyId)).get_version(); }
@Override public void run(ClientBlobStore blobStore) throws Exception { Iterator<String> keys; boolean isArgsEmpty = (args == null || args.length == 0); if (isArgsEmpty) { keys = blobStore.listKeys(); } else { keys = Arrays.asList(args).iterator(); } while (keys.hasNext()) { String key = keys.next(); try { ReadableBlobMeta meta = blobStore.getBlobMeta(key); long version = meta.get_version(); List<AccessControl> acl = meta.get_settable().get_acl(); LOG.info("{} {} {}", key, version, generateAccessControlsInfo(acl)); } catch (AuthorizationException ae) { if (!isArgsEmpty) { LOG.error("ACCESS DENIED to key: {}", key); } } catch (KeyNotFoundException knf) { if (!isArgsEmpty) { LOG.error("{} NOT FOUND", key); } } } } });
public static long nimbusVersionOfBlob(String key, ClientBlobStore cb) throws AuthorizationException, KeyNotFoundException { long nimbusBlobVersion = 0; ReadableBlobMeta metadata = cb.getBlobMeta(key); nimbusBlobVersion = metadata.get_version(); return nimbusBlobVersion; }
public Object getFieldValue(_Fields field) { switch (field) { case SETTABLE: return get_settable(); case VERSION: return get_version(); } throw new IllegalStateException(); }