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);
}
Aggregations