nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (NIFI-924) Add Camel support in NiFi
Date Mon, 01 Feb 2016 01:17:40 GMT


ASF GitHub Bot commented on NIFI-924:

Github user PuspenduBanerjee commented on the pull request:
    Hi @joewitt 
    For now the issue is happening for org.apache.nifi.processors.standard.TestExecuteStreamCommand.testExecuteIngestAndUpdate().
    Where we are running a Pattern on 100MB data. So, I have modified the testcase with a
sliding window matching mechanism. I hope it will work.:
         * Generates a String representation by taking a slice of backing byte[] from MockFile.
         * It's a low memory foot-print alternative to {@code new String(mockFile.toByteArray)}
         * @param mockFlowFile 
         * @param patternToMatch
         * @return
         * @throws NoSuchFieldException
         * @throws SecurityException
         * @throws IllegalArgumentException
         * @throws IllegalAccessException
        private boolean matchPattern(MockFlowFile mockFlowFile, final String  patternToMatch)
throws NoSuchFieldException, SecurityException, 
IllegalAccessException {
            final Pattern pattern= Pattern.compile(patternToMatch);
            Field dataField=MockFlowFile.class.getDeclaredField("data");
            byte[] byteArray = (byte[])dataField.get(mockFlowFile);
            final int sliceLength=patternToMatch.length()>(10240)?patternToMatch.length():(10240);
            final int windowLength=sliceLength-patternToMatch.length();
            int offset=0;
            StringBuilder stringBuilder=new StringBuilder();
                if(pattern.matcher(stringBuilder.append(new String(Arrays.copyOfRange(byteArray,
offset, (offset+sliceLength))))).find()){
                    return true;
                stringBuilder.delete(0, windowLength);
            return false;

> Add Camel support in NiFi
> -------------------------
>                 Key: NIFI-924
>                 URL:
>             Project: Apache NiFi
>          Issue Type: New Feature
>            Reporter: Jean-Baptiste Onofré
> I'm working on a NiFi Route able to leverage a Camel route (runtime routing), and another
one being able to bootstrap a Camel route starting from Camel DSLs.

This message was sent by Atlassian JIRA

View raw message