/** * Alter storage specified by the name to new definition * * @param storage The new storage definition * @throws LensException */ public void alterStorage(XStorage storage) throws LensException, HiveException { alterStorage(storage.getName(), JAXBUtils.storageFromXStorage(storage)); }
/** * Alter storage specified by the name to new definition * * @param storage The new storage definition * @throws LensException */ public void alterStorage(XStorage storage) throws LensException, HiveException { alterStorage(storage.getName(), JAXBUtils.storageFromXStorage(storage)); } public void alterStorage(String storageName, Storage storage) throws LensException, HiveException {
@Override public void alterStorage(LensSessionHandle sessionid, String storageName, XStorage storage) throws LensException { try (SessionContext ignored = new SessionContext(sessionid)){ getClient(sessionid).alterStorage(storage); log.info("Altered storage " + storageName); } catch (HiveException e) { throw new LensException(e); } }
public <T extends Equals & HashCode & ToString> void updateEntity(String name, T entity) throws LensException, HiveException { if (entity instanceof XStorage) { alterStorage((XStorage) entity); } else if (entity instanceof XCube) { alterCube((XCube)entity); } else if (entity instanceof XDimension) { alterDimension((XDimension) entity); } else if (entity instanceof XFact) { alterCubeFactTable((XFact) entity); } else if (entity instanceof XDimensionTable) { alterCubeDimensionTable((XDimensionTable) entity); } else if (entity instanceof XSegmentation) { alterSegmentation((XSegmentation) entity); } else { throw new LensException("Unable to alter entity " + entity + " as it's unrecognizable: " + entity.getClass()); } }
public <T extends Equals & HashCode & ToString> void updateEntity(String name, T entity) throws LensException, HiveException { if (entity instanceof XStorage) { alterStorage((XStorage) entity); } else if (entity instanceof XCube) { alterCube((XCube)entity); } else if (entity instanceof XDimension) { alterDimension((XDimension) entity); } else if (entity instanceof XFact) { alterCubeFactTable((XFact) entity); } else if (entity instanceof XDimensionTable) { alterCubeDimensionTable((XDimensionTable) entity); } else if (entity instanceof XSegmentation) { alterSegmentation((XSegmentation) entity); } else { throw new LensException("Unable to alter entity " + entity + " as it's unrecognizable: " + entity.getClass()); } }