@Override public PhysicalContext resolve(PhysicalContext pctx) throws SemanticException { int counter = 0; for (Task task : getExplainOrder(pctx)) { task.setId(PREFIX + (++counter)); } return null; }
@Override public PhysicalContext resolve(PhysicalContext pctx) throws SemanticException { int counter = 0; for (Task task : getExplainOrder(pctx)) { task.setId(PREFIX + (++counter)); } return null; }
@SuppressWarnings("unchecked") @VisibleForTesting static <T extends Serializable> Task<T> get(Class<T> workClass) { for (TaskTuple<? extends Serializable> t : taskvec) { if (t.workClass == workClass) { try { Task<T> ret = (Task<T>) t.taskClass.newInstance(); ret.setId("Stage-" + Integer.toString(getAndIncrementId())); return ret; } catch (Exception e) { throw new RuntimeException(e); } } } throw new RuntimeException("No task for work class " + workClass.getName()); }
@SuppressWarnings("unchecked") public static <T extends Serializable> Task<T> get(Class<T> workClass, HiveConf conf) { for (TaskTuple<? extends Serializable> t : taskvec) { if (t.workClass == workClass) { try { Task<T> ret = (Task<T>) t.taskClass.newInstance(); ret.setId("Stage-" + Integer.toString(getAndIncrementId())); return ret; } catch (Exception e) { throw new RuntimeException(e); } } } throw new RuntimeException("No task for work class " + workClass.getName()); }
@Override public PhysicalContext resolve(PhysicalContext pctx) throws SemanticException { int counter = 0; for (Task task : getExplainOrder(pctx)) { task.setId(PREFIX + (++counter)); } return null; }
@SuppressWarnings("unchecked") public static <T extends Serializable> Task<T> get(Class<T> workClass, HiveConf conf) { for (TaskTuple<? extends Serializable> t : taskvec) { if (t.workClass == workClass) { try { Task<T> ret = (Task<T>) t.taskClass.newInstance(); ret.setId("Stage-" + Integer.toString(getAndIncrementId())); return ret; } catch (Exception e) { throw new RuntimeException(e); } } } throw new RuntimeException("No task for work class " + workClass.getName()); }
@SuppressWarnings("unchecked") public static <T extends Serializable> Task<T> get(Class<T> workClass, HiveConf conf) { for (taskTuple<? extends Serializable> t : taskvec) { if (t.workClass == workClass) { try { Task<T> ret = (Task<T>) t.taskClass.newInstance(); ret.setId("Stage-" + Integer.toString(getAndIncrementId())); return ret; } catch (Exception e) { throw new RuntimeException(e); } } } throw new RuntimeException("No task for work class " + workClass.getName()); }
While(taskCursor.next()){ Task task = new task(); task.setId(taskCursor.getLong(0));