Search in sources :

Example 1 with RemoteSparkJobMonitor

use of org.apache.hadoop.hive.ql.exec.spark.status.RemoteSparkJobMonitor in project hive by apache.

the class TestSparkTask method testRemoteSparkCancel.

@Test
public void testRemoteSparkCancel() {
    RemoteSparkJobStatus jobSts = mock(RemoteSparkJobStatus.class);
    when(jobSts.getRemoteJobState()).thenReturn(State.CANCELLED);
    when(jobSts.isRemoteActive()).thenReturn(true);
    HiveConf hiveConf = new HiveConf();
    SessionState.start(hiveConf);
    RemoteSparkJobMonitor remoteSparkJobMonitor = new RemoteSparkJobMonitor(hiveConf, jobSts);
    Assert.assertEquals(remoteSparkJobMonitor.startMonitor(), 3);
}
Also used : RemoteSparkJobMonitor(org.apache.hadoop.hive.ql.exec.spark.status.RemoteSparkJobMonitor) RemoteSparkJobStatus(org.apache.hadoop.hive.ql.exec.spark.status.impl.RemoteSparkJobStatus) HiveConf(org.apache.hadoop.hive.conf.HiveConf) Test(org.junit.Test)

Aggregations

HiveConf (org.apache.hadoop.hive.conf.HiveConf)1 RemoteSparkJobMonitor (org.apache.hadoop.hive.ql.exec.spark.status.RemoteSparkJobMonitor)1 RemoteSparkJobStatus (org.apache.hadoop.hive.ql.exec.spark.status.impl.RemoteSparkJobStatus)1 Test (org.junit.Test)1