public static List<String> getMRDependentResources(TableDesc table) { return getSource(table).getSourceMetadataExplorer().getRelatedKylinResources(table); } }
public static <T> T createEngineAdapter(ISourceAware table, Class<T> engineInterface) { return getSource(table).adaptToBuildEngine(engineInterface); }
public static IReadableTable createReadableTable(TableDesc table, String uuid) { return getSource(table).createReadableTable(table, uuid); }
@Override public SourcePartition enrichSourcePartitionBeforeBuild(IBuildable buildable, SourcePartition srcPartition) { SourcePartition result = SourcePartition.getCopyOf(srcPartition); if (srcPartition.getTSRange() != null) { result.setSegRange(null); } return result; }
/** * * @param project * @param database * @return * @throws Exception */ public List<String> getSourceTableNames(String project, String database) throws Exception { ISourceMetadataExplorer explr = SourceManager.getInstance(getConfig()).getProjectSource(project) .getSourceMetadataExplorer(); return explr.listTables(database); }
/** * * @param project * @return * @throws Exception */ public List<String> getSourceDbNames(String project) throws Exception { ISourceMetadataExplorer explr = SourceManager.getInstance(getConfig()).getProjectSource(project) .getSourceMetadataExplorer(); return explr.listDatabases(); }
public List<TableSnapshotResponse> getLookupTableSnapshots(String project, String tableName) throws IOException { TableDesc tableDesc = getTableManager().getTableDesc(tableName, project); IReadableTable hiveTable = SourceManager.createReadableTable(tableDesc, null); TableSignature signature = hiveTable.getSignature(); return internalGetLookupTableSnapshots(tableName, signature); }
@Override public SourcePartition enrichSourcePartitionBeforeBuild(IBuildable buildable, SourcePartition srcPartition) { SourcePartition result = SourcePartition.getCopyOf(srcPartition); result.setSegRange(null); return result; }
protected List<String> getHiveTables() throws Exception { ISourceMetadataExplorer explr = SourceManager.getDefaultSource().getSourceMetadataExplorer(); return explr.listTables(config.getHiveDatabaseForIntermediateTable()); }
@Override public TableSignature getSignature() throws IOException { return new IReadableTable.TableSignature("", 2 * 1024 * 1024, System.currentTimeMillis()); } @Override
SnapshotTable(IReadableTable table, String tableName) throws IOException { this.tableName = tableName; this.signature = table.getSignature(); this.useDictionary = true; }
@Override public void close() throws IOException { for (IReadableTable.TableReader reader : readers) { if (reader != null) reader.close(); } }
static SourceManager newInstance(KylinConfig config) throws IOException { return new SourceManager(config); }
public void loadAllTables() throws SQLException { for (String tableName : ALL_TABLES) { loadH2Table(tableName); } }
@Override public SourcePartition enrichSourcePartitionBeforeBuild(IBuildable buildable, SourcePartition srcPartition) { SourcePartition result = SourcePartition.getCopyOf(srcPartition); result.setSegRange(null); return result; }
@Override public void close() throws IOException { for (IReadableTable.TableReader reader : readers) reader.close(); }
@Override public void close() throws IOException { if (reader != null) reader.close(); }
public void close() throws IOException { if (this.reader != null) reader.close(); }
public void close() throws IOException { if (this.reader != null) reader.close(); }