/** * Get the native table passed in name * * @param sessionid The sessionid in which user is working * @param tableName The native table name * @return JAXB representation of {@link XNativeTable} * @throws WebApplicationException */ @GET @Path("nativetables/{tableName}") public JAXBElement<XNativeTable> getNativeTable(@QueryParam("sessionid") LensSessionHandle sessionid, @PathParam("tableName") String tableName) throws LensException { checkSessionId(sessionid); return X_CUBE_OBJECT_FACTORY.createXNativeTable(getSvc().getNativeTable(sessionid, tableName)); }
public static XNativeTable nativeTableFromMetaTable(Table table) { XNativeTable xtable = XCF.createXNativeTable(); xtable.setColumns(new XColumns()); xtable.setName(table.getTableName()); xtable.setDbname(table.getDbName()); xtable.setOwner(table.getOwner()); xtable.setCreatetime(table.getTTable().getCreateTime()); xtable.setLastAccessTime(table.getTTable().getLastAccessTime()); xtable.getColumns().getColumn().addAll(columnsFromFieldSchemaList(table.getCols())); xtable.setStorageDescriptor(getStorageTableDescFromHiveTable(table)); xtable.setTableType(table.getTableType().name()); return xtable; }
public static XNativeTable nativeTableFromMetaTable(Table table) { XNativeTable xtable = XCF.createXNativeTable(); xtable.setColumns(new XColumns()); xtable.setName(table.getTableName()); xtable.setDbname(table.getDbName()); xtable.setOwner(table.getOwner()); xtable.setCreatetime(table.getTTable().getCreateTime()); xtable.setLastAccessTime(table.getTTable().getLastAccessTime()); xtable.getColumns().getColumn().addAll(columnsFromFieldSchemaList(table.getCols())); xtable.setStorageDescriptor(getStorageTableDescFromHiveTable(table)); xtable.setTableType(table.getTableType().name()); return xtable; }