Search in sources :

Example 1 with ICCContext

use of org.apache.hyracks.api.context.ICCContext in project asterixdb by apache.

the class HDFSUtils method initializeIndexingHDFSScheduler.

public static IndexingScheduler initializeIndexingHDFSScheduler(ICCServiceContext serviceCtx) throws HyracksDataException {
    ICCContext ccContext = serviceCtx.getCCContext();
    IndexingScheduler scheduler = null;
    try {
        scheduler = new IndexingScheduler(ccContext.getClusterControllerInfo().getClientNetAddress(), ccContext.getClusterControllerInfo().getClientNetPort());
    } catch (HyracksException e) {
        throw new RuntimeDataException(ErrorCode.UTIL_HDFS_UTILS_CANNOT_OBTAIN_HDFS_SCHEDULER);
    }
    return scheduler;
}
Also used : IndexingScheduler(org.apache.asterix.external.indexing.IndexingScheduler) HyracksException(org.apache.hyracks.api.exceptions.HyracksException) ICCContext(org.apache.hyracks.api.context.ICCContext) RuntimeDataException(org.apache.asterix.common.exceptions.RuntimeDataException)

Example 2 with ICCContext

use of org.apache.hyracks.api.context.ICCContext in project asterixdb by apache.

the class HDFSUtils method initializeHDFSScheduler.

public static Scheduler initializeHDFSScheduler(ICCServiceContext serviceCtx) throws HyracksDataException {
    ICCContext ccContext = serviceCtx.getCCContext();
    Scheduler scheduler = null;
    try {
        scheduler = new Scheduler(ccContext.getClusterControllerInfo().getClientNetAddress(), ccContext.getClusterControllerInfo().getClientNetPort());
    } catch (HyracksException e) {
        throw new RuntimeDataException(ErrorCode.UTIL_HDFS_UTILS_CANNOT_OBTAIN_HDFS_SCHEDULER);
    }
    return scheduler;
}
Also used : Scheduler(org.apache.hyracks.hdfs.scheduler.Scheduler) IndexingScheduler(org.apache.asterix.external.indexing.IndexingScheduler) HyracksException(org.apache.hyracks.api.exceptions.HyracksException) ICCContext(org.apache.hyracks.api.context.ICCContext) RuntimeDataException(org.apache.asterix.common.exceptions.RuntimeDataException)

Aggregations

RuntimeDataException (org.apache.asterix.common.exceptions.RuntimeDataException)2 IndexingScheduler (org.apache.asterix.external.indexing.IndexingScheduler)2 ICCContext (org.apache.hyracks.api.context.ICCContext)2 HyracksException (org.apache.hyracks.api.exceptions.HyracksException)2 Scheduler (org.apache.hyracks.hdfs.scheduler.Scheduler)1