@Override public int getExecutorCount() { return sc.sc().getExecutorMemoryStatus().size(); }
@Override public Integer call(JobContext jc) throws Exception { // minus 1 here otherwise driver is also counted as an executor int count = jc.sc().sc().getExecutorMemoryStatus().size() - 1; return Integer.valueOf(count); }
@Override public int getExecutorCount() { return sc.sc().getExecutorMemoryStatus().size(); }
private int currentActiveExecutors() { try { scala.collection.Map<String, Tuple2<Object, Object>> executors = this.sqlCtx .sparkContext().getExecutorMemoryStatus(); return executors.size(); } catch (Throwable e) { log.error("Error occurred while checking current Spark active executors.", e); } return 0; }
@Override public int getExecutorCount() { return sc.sc().getExecutorMemoryStatus().size(); }
@Override public Integer call(JobContext jc) throws Exception { // minus 1 here otherwise driver is also counted as an executor int count = jc.sc().sc().getExecutorMemoryStatus().size() - 1; return Integer.valueOf(count); }
@Override public Integer call(JobContext jc) throws Exception { // minus 1 here otherwise driver is also counted as an executor int count = jc.sc().sc().getExecutorMemoryStatus().size() - 1; return Integer.valueOf(count); }