/** * Throw a TajoRuntimeException. It is usually used for unexpected exceptions. * * @param state ReturnState * @return True if no error. */ public static boolean ensureOk(ReturnState state) { if (isError(state)) { throw new TajoRuntimeException(state); } return true; }
public static SQLException toSQLException(DefaultTajoException e) throws SQLException { if (e instanceof TajoRuntimeException) { return toSQLException(e.getErrorCode(), ((TajoRuntimeException) e).getCause().getMessage()); } else { return toSQLException(e.getErrorCode(), e.getMessage()); } }
public static SQLException toSQLException(DefaultTajoException e) throws SQLException { if (e instanceof TajoRuntimeException) { return toSQLException(e.getErrorCode(), ((TajoRuntimeException) e).getCause().getMessage()); } else { return toSQLException(e.getErrorCode(), e.getMessage()); } }
/** * Throw a TajoRuntimeException. It is usually used for unexpected exceptions. * * @param state ReturnState * @return True if no error. */ public static boolean ensureOk(ReturnState state) { if (isError(state)) { throw new TajoRuntimeException(state); } return true; }
public static <T extends Tablespace> T getByName(String name) { URI uri = SPACES_URIS_MAP.get(name); if (uri != null) { return (T) TABLE_SPACES.get(uri); } else { throw new TajoRuntimeException(new UndefinedTablespaceException(name)); } }
/** * if {@link StorageProperty#isArbitraryPathAllowed} is true, * the storage allows arbitrary path accesses. In this case, the storage must provide the root URI. * * @see {@link StorageProperty#isArbitraryPathAllowed} * @return Root URI */ public URI getRootUri() { throw new TajoRuntimeException(new UnsupportedException(String.format("artibrary path '%s'", uri.toString()))); }
public static <T extends Tablespace> T getByName(String name) { URI uri = SPACES_URIS_MAP.get(name); if (uri != null) { return (T) TABLE_SPACES.get(uri); } else { throw new TajoRuntimeException(new UndefinedTablespaceException(name)); } }
/** * if {@link StorageProperty#isArbitraryPathAllowed} is true, * the storage allows arbitrary path accesses. In this case, the storage must provide the root URI. * * @see {@link StorageProperty#isArbitraryPathAllowed} * @return Root URI */ public URI getRootUri() { throw new TajoRuntimeException(new UnsupportedException(String.format("artibrary path '%s'", uri.toString()))); }
@SuppressWarnings("unused") public int markAccetablePlanPart(LogicalPlan plan) { throw new TajoRuntimeException(new UnsupportedException()); } }
@Override public List<TajoMasterInfo> getMasters() throws IOException { throw new TajoRuntimeException(new UnsupportedException()); } }
/** * Resets the scanner */ @Override public void reset() throws IOException { throw new TajoRuntimeException(new NotImplementedException()); }
@Override public Datum[] getValues() { throw new TajoRuntimeException(new UnsupportedException()); } }
@Override public URI getStagingUri(OverridableConf context, String queryId, TableMeta meta) throws IOException { throw new TajoRuntimeException(new UnsupportedException()); } }
@Override public Schema getSchema() { throw new TajoRuntimeException(new NotImplementedException()); } }
@Override public Datum[] getValues() { throw new TajoRuntimeException(new UnsupportedException()); } }
/** * Resets the scanner */ @Override public void reset() throws IOException { throw new TajoRuntimeException(new NotImplementedException()); }
@Override public Datum[] getValues(){ throw new TajoRuntimeException(new UnsupportedException()); } }
@Override public List<TajoMasterInfo> getMasters() throws IOException { throw new TajoRuntimeException(new NotImplementedException()); } }
@SuppressWarnings("unused") public int markAccetablePlanPart(LogicalPlan plan) { throw new TajoRuntimeException(new UnsupportedException()); } }
@Override public TupleRange[] getInsertSortRanges(OverridableConf queryContext, TableDesc tableDesc, Schema inputSchema, SortSpec[] sortSpecs, TupleRange dataRange) throws IOException { throw new TajoRuntimeException(new NotImplementedException()); }