public static HashMap<String, String> stringListToMap(StringList stringList) { HashMap<String, String> map = new HashMap<String, String>(); if (stringList == null) { return null; } List<String> list = stringList.getElements(); for (String element : list) { StringTokenizer tk = new StringTokenizer(element, "="); map.put(tk.nextToken(), tk.nextToken()); } return map; }
/** * Gets the connection params. * * @param key the key * @return the connection params */ public List<String> getConnectionParams(String key) { WebTarget target = getSessionWebTarget(); StringList value = target.path("params").queryParam("sessionid", this.sessionHandle).queryParam("key", key) .request().get(StringList.class); return value.getElements(); }
/** * List resources from session * * @param type type of resource * @return List of resources */ public List<String> listResourcesFromConnection(String type) { WebTarget target = getSessionWebTarget(); StringList result = target.path("resources/list").queryParam("sessionid", this.sessionHandle) .queryParam("type", type).request().get(StringList.class); return result.getElements(); }
public List<String> getConnectionParams() { WebTarget target = getSessionWebTarget(); StringList list = target.path("params").queryParam("sessionid", this.sessionHandle).queryParam("verbose", true) .request().get(StringList.class); return list.getElements(); }
public List<String> getPartitionTimelines(String factName, String storageName, String updatePeriod, String timeDimension) { return getMetastoreWebTarget().path("facts").path(factName).path("timelines") .queryParam("storage", storageName) .queryParam("updatePeriod", updatePeriod) .queryParam("timeDimension", timeDimension) .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .get(StringList.class).getElements(); }
public List<String> getAllStoragesOfFactTable(String factName) { WebTarget target = getMetastoreWebTarget(); StringList storageList = target.path("facts").path(factName).path("storages") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .get(StringList.class); return storageList.getElements(); }
public List<String> getAllStoragesOfDimTable(String dimTblName) { WebTarget target = getMetastoreWebTarget(); StringList list = target.path("dimtables").path(dimTblName).path("storages") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .get(StringList.class); return list.getElements(); }
public List<String> getAlldatabases() { WebTarget target = getMetastoreWebTarget(); StringList databases = target.path("databases") .queryParam("sessionid", connection.getSessionHandle()) .request().get(StringList.class); return databases.getElements(); }
public List<String> getAllFactTables() { WebTarget target = getMetastoreWebTarget(); StringList factTables; factTables = target.path("facts") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .get(StringList.class); return factTables.getElements(); }
public List<String> getAllDimensions() { WebTarget target = getMetastoreWebTarget(); StringList dimensions = target.path("dimensions") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML).get(StringList.class); return dimensions.getElements(); }
public List<String> getAllNativeTables() { WebTarget target = getMetastoreWebTarget(); StringList nativetables = target.path("nativetables") .queryParam("sessionid", connection.getSessionHandle()) .request().get(StringList.class); return nativetables.getElements(); }
public List<String> getAllCubes() { WebTarget target = getMetastoreWebTarget(); StringList cubes = target.path("cubes") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML).get(StringList.class); return cubes.getElements(); }
public List<String> getAllDimensions() { WebTarget target = getMetastoreWebTarget(); StringList dimensions = target.path("dimensions") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML).get(StringList.class); return dimensions.getElements(); }
public List<String> getAllStorages() { WebTarget target = getMetastoreWebTarget(); StringList storages = target.path("storages") .queryParam("sessionid", this.connection.getSessionHandle()) .request().get(StringList.class); return storages.getElements(); }
public List<String> getAllStorages() { WebTarget target = getMetastoreWebTarget(); StringList storages = target.path("storages") .queryParam("sessionid", this.connection.getSessionHandle()) .request().get(StringList.class); return storages.getElements(); }
public List<String> getAllDimensionTables() { WebTarget target = getMetastoreWebTarget(); StringList dimtables; dimtables = target.path("dimtables") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .get(StringList.class); return dimtables.getElements(); }
public List<String> getAllSegmentations() { WebTarget target = getMetastoreWebTarget(); StringList segmentations; segmentations = target.path("segmentations") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .get(StringList.class); return segmentations.getElements(); }
public List<String> getAllDimensionTables(String dimensionName) { if (dimensionName == null) { return getAllDimensionTables(); } WebTarget target = getMetastoreWebTarget(); StringList dimtables; dimtables = target.path("dimensions").path(dimensionName).path("dimtables") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .get(StringList.class); return dimtables.getElements(); }
public List<String> getAllSegmentations(String cubeName) { if (cubeName == null) { return getAllSegmentations(); } WebTarget target = getMetastoreWebTarget(); StringList segmentations; segmentations = target.path("cubes").path(cubeName).path("segmentations") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .get(StringList.class); return segmentations.getElements(); }
public List<String> getAllFactTables(String cubeName) { if (cubeName == null) { return getAllFactTables(); } WebTarget target = getMetastoreWebTarget(); StringList factTables; factTables = target.path("cubes").path(cubeName).path("facts") .queryParam("sessionid", this.connection.getSessionHandle()) .request(MediaType.APPLICATION_XML) .get(StringList.class); return factTables.getElements(); }