use of org.apache.hadoop.hive.ql.plan.MoveWork in project hive by apache.
the class TestGenMapRedUtilsCreateConditionalTask method testMergePathWithInvalidMoveWorkThrowsException.
@Test(expected = IllegalArgumentException.class)
public void testMergePathWithInvalidMoveWorkThrowsException() {
final Path condInputPath = new Path("s3a://bucket/scratch/-ext-10000");
final MoveWork mockWork = mock(MoveWork.class);
final LineageState lineageState = new LineageState();
when(mockWork.getLoadMultiFilesWork()).thenReturn(new LoadMultiFilesDesc());
GenMapRedUtils.mergeMovePaths(condInputPath, mockWork, lineageState);
}
use of org.apache.hadoop.hive.ql.plan.MoveWork in project hive by apache.
the class TestGenMapRedUtilsCreateConditionalTask method createMoveTask.
private Task<MoveWork> createMoveTask(Path source, Path destination) {
Task<MoveWork> moveTask = mock(MoveTask.class);
MoveWork moveWork = new MoveWork();
moveWork.setLoadFileWork(new LoadFileDesc(source, destination, true, null, null, false));
when(moveTask.getWork()).thenReturn(moveWork);
return moveTask;
}
Aggregations