Search in sources :

Example 16 with KerberosProperties

use of org.apache.nifi.hadoop.KerberosProperties in project nifi by apache.

the class TestListHDFS method setup.

@Before
public void setup() throws InitializationException {
    mockNiFiProperties = mock(NiFiProperties.class);
    when(mockNiFiProperties.getKerberosConfigurationFile()).thenReturn(null);
    kerberosProperties = new KerberosProperties(null);
    proc = new ListHDFSWithMockedFileSystem(kerberosProperties);
    runner = TestRunners.newTestRunner(proc);
    service = new MockCacheClient();
    runner.addControllerService("service", service);
    runner.enableControllerService(service);
    runner.setProperty(ListHDFS.HADOOP_CONFIGURATION_RESOURCES, "src/test/resources/core-site.xml");
    runner.setProperty(ListHDFS.DIRECTORY, "/test");
    runner.setProperty(ListHDFS.DISTRIBUTED_CACHE_SERVICE, "service");
}
Also used : NiFiProperties(org.apache.nifi.util.NiFiProperties) KerberosProperties(org.apache.nifi.hadoop.KerberosProperties) Before(org.junit.Before)

Example 17 with KerberosProperties

use of org.apache.nifi.hadoop.KerberosProperties in project nifi by apache.

the class TestGetHDFSEvents method setup.

@Before
public void setup() {
    mockNiFiProperties = mock(NiFiProperties.class);
    when(mockNiFiProperties.getKerberosConfigurationFile()).thenReturn(null);
    kerberosProperties = new KerberosProperties(null);
    inotifyEventInputStream = mock(DFSInotifyEventInputStream.class);
    hdfsAdmin = mock(HdfsAdmin.class);
}
Also used : NiFiProperties(org.apache.nifi.util.NiFiProperties) HdfsAdmin(org.apache.hadoop.hdfs.client.HdfsAdmin) DFSInotifyEventInputStream(org.apache.hadoop.hdfs.DFSInotifyEventInputStream) KerberosProperties(org.apache.nifi.hadoop.KerberosProperties) Before(org.junit.Before)

Aggregations

KerberosProperties (org.apache.nifi.hadoop.KerberosProperties)17 Before (org.junit.Before)13 NiFiProperties (org.apache.nifi.util.NiFiProperties)9 File (java.io.File)6 ArrayList (java.util.ArrayList)2 FileSystem (org.apache.hadoop.fs.FileSystem)2 PropertyDescriptor (org.apache.nifi.components.PropertyDescriptor)2 Relationship (org.apache.nifi.processor.Relationship)2 MockFlowFile (org.apache.nifi.util.MockFlowFile)2 TestRunner (org.apache.nifi.util.TestRunner)2 Test (org.junit.Test)2 FileInputStream (java.io.FileInputStream)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Configuration (org.apache.hadoop.conf.Configuration)1 Path (org.apache.hadoop.fs.Path)1 Table (org.apache.hadoop.hbase.client.Table)1 DFSInotifyEventInputStream (org.apache.hadoop.hdfs.DFSInotifyEventInputStream)1 HdfsAdmin (org.apache.hadoop.hdfs.client.HdfsAdmin)1 HiveConf (org.apache.hadoop.hive.conf.HiveConf)1