/** * Get the name prefix of the storage * * @return Name followed by storage separator */ public String getPrefix() { return getPrefix(getName()); }
/** * Get the name prefix of the storage * * @return Name followed by storage separator */ public String getPrefix() { return getPrefix(getName()); }
@Override protected void addProperties() { super.addProperties(); getProperties().put(MetastoreUtil.getStorageClassKey(getName()), getClass().getCanonicalName()); }
@Override protected void addProperties() { super.addProperties(); getProperties().put(MetastoreUtil.getStorageClassKey(getName()), getClass().getCanonicalName()); }
public void createStorage(Storage storage) throws LensException { createCubeHiveTable(storage); // do a get to update cache getStorage(storage.getName()); }
/** * Update existing partition * @param client hive client instance * @param fact fact name * @param partition partition to be updated * @throws InvalidOperationException * @throws HiveException */ public void updatePartition(Hive client, String fact, Partition partition) throws InvalidOperationException, HiveException { client.alterPartition(MetastoreUtil.getFactOrDimtableStorageTableName(fact, getName()), partition, null); }
/** * Update existing partition * @param client hive client instance * @param fact fact name * @param partition partition to be updated * @throws InvalidOperationException * @throws HiveException */ public void updatePartition(Hive client, String fact, Partition partition) throws InvalidOperationException, HiveException { client.alterPartition(MetastoreUtil.getFactOrDimtableStorageTableName(fact, getName()), partition, null); }
@Override public List<String> getAllStorageNames(LensSessionHandle sessionid) throws LensException { try (SessionContext ignored = new SessionContext(sessionid)){ Collection<Storage> storages = getClient(sessionid).getAllStorages(); if (storages != null && !storages.isEmpty()) { List<String> names = new ArrayList<>(storages.size()); for (Storage storage : storages) { names.add(storage.getName()); } return names; } } return null; }
public void createStorage(Storage storage) throws LensException { checkIfAuthorized(); createCubeHiveTable(storage); // do a get to update cache getStorage(storage.getName()); }
public static XStorage xstorageFromStorage(Storage storage) { if (storage == null) { return null; } XStorage xstorage = null; xstorage = XCF.createXStorage(); xstorage.setProperties(new XProperties()); xstorage.setName(storage.getName()); xstorage.setClassname(storage.getClass().getCanonicalName()); xstorage.getProperties().getProperty().addAll(xPropertiesFromMap(storage.getProperties())); return xstorage; }
public static XStorage xstorageFromStorage(Storage storage) { if (storage == null) { return null; } XStorage xstorage = null; xstorage = XCF.createXStorage(); xstorage.setProperties(new XProperties()); xstorage.setName(storage.getName()); xstorage.setClassname(storage.getClass().getCanonicalName()); xstorage.getProperties().getProperty().addAll(xPropertiesFromMap(storage.getProperties())); return xstorage; }
s1.setStorageHandler(DBStorageHandler.class.getCanonicalName()); s1.setExternal(true); dumpPeriods.put(db1.getName(), null); dumpPeriods.put(db2.getName(), null); storageTables.put(db1.getName(), s1); storageTables.put(db2.getName(), s1); client.createCubeDimensionTable("zipdim", dimTblName, dimColumns, 0L, dumpPeriods, null, storageTables);