Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

NiFi custom processor createClient() ?


NiFi custom processor createClient() ?


I use NiFiClientFactory().createClient(), but I want to know what should go into createClient().

( )

My Source is :

// dddd
        NiFiClient client = null;
        try {
            final ClientFactory<NiFiClient> nifiClientFactory = getContext().getNiFiClientFactory();
            client = new NiFiClientFactory().createClient(???);
        } catch (MissingOptionException e) {

        try {
            String processGroup = "2129ff11-2b41-39ff-4b96-d0b7243e94b9";
            VariableRegistryEntity entity = client.getProcessGroupClient().getVariables(processGroup);

            Set<VariableEntity> varSet = entity.getVariableRegistry().getVariables();
            Map<String, String> processorVariables = new HashMap<>();

            varSet.forEach(variable -> {
                VariableDTO dto = variable.getVariable();
                logger_.debug("Key: " + dto.getName());
                logger_.debug("Value: " + dto.getValue());
                processorVariables.put(dto.getName(), dto.getValue());

        } catch (NiFiClientException ex) {

How do I do it?

I hope to get nifi flow's variables data.

Don't have an account?
Coming from Hortonworks? Activate your account here