Search in sources :

Example 1 with StormJaasCreator

use of com.hortonworks.streamline.streams.storm.common.StormJaasCreator in project streamline by hortonworks.

the class StormTopologyActionsImpl method createJaasFile.

private String createJaasFile(String kerberizedNimbusServiceName) {
    try {
        Path jaasFilePath = Files.createTempFile("jaas-", UUID.randomUUID().toString());
        String filePath = jaasFilePath.toAbsolutePath().toString();
        File jaasFile = new StormJaasCreator().create(filePath, kerberizedNimbusServiceName);
        return jaasFile.getAbsolutePath();
    } catch (IOException e) {
        throw new RuntimeException("Can't create JAAS file to connect to secure nimbus", e);
    }
}
Also used : Path(java.nio.file.Path) StormJaasCreator(com.hortonworks.streamline.streams.storm.common.StormJaasCreator) IOException(java.io.IOException) File(java.io.File)

Aggregations

StormJaasCreator (com.hortonworks.streamline.streams.storm.common.StormJaasCreator)1 File (java.io.File)1 IOException (java.io.IOException)1 Path (java.nio.file.Path)1