Flume
  1. Flume
  2. FLUME-1570

StressSource batching does not work unless maxTotalEvents is specified

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: v1.3.0
    • Fix Version/s: v1.3.0
    • Component/s: Sinks+Sources
    • Labels:
      None

      Description

      java.lang.IllegalArgumentException: fromIndex(0) > toIndex(-1002)
      	at java.util.SubList.<init>(AbstractList.java:604)
      	at java.util.RandomAccessSubList.<init>(AbstractList.java:758)
      	at java.util.AbstractList.subList(AbstractList.java:468)
      	at org.apache.flume.source.StressSource.process(StressSource.java:119)
      	at org.apache.flume.source.PollableSourceRunner$PollingRunner.run(PollableSourceRunner.java:139)
      	at java.lang.Thread.run(Thread.java:662)
      
      
      1. FLUME-1570-0.patch
        2 kB
        Ted Malaska
      2. FLUME-1570-1.patch
        5 kB
        Ted Malaska

        Issue Links

          Activity

          Brock Noland created issue -
          Hide
          Brock Noland added a comment -

          Looks like the problem is due to the fact that maxTotalEvents is optional and the error happens when it's not specified. Also the return value of eventBatchList.subList(0, (int)eventsLeft - 1); is not assigned to anything.

          Show
          Brock Noland added a comment - Looks like the problem is due to the fact that maxTotalEvents is optional and the error happens when it's not specified. Also the return value of eventBatchList.subList(0, (int)eventsLeft - 1); is not assigned to anything.
          Ted Malaska made changes -
          Field Original Value New Value
          Assignee Ted Malaska [ ted.m ]
          Hide
          Ted Malaska added a comment -

          If maxTotalEvents is -1 then don't ask how many are left.

          Also added a junit that tests the case where maxTotalEvents is not defined in the config.

          Show
          Ted Malaska added a comment - If maxTotalEvents is -1 then don't ask how many are left. Also added a junit that tests the case where maxTotalEvents is not defined in the config.
          Ted Malaska made changes -
          Attachment FLUME-1570-0.patch [ 12544858 ]
          Ted Malaska made changes -
          Remote Link This issue links to "review board (Web Link)" [ 11130 ]
          Hide
          Ted Malaska added a comment -

          Fixed issues found in the review.

          Show
          Ted Malaska added a comment - Fixed issues found in the review.
          Ted Malaska made changes -
          Attachment FLUME-1570-1.patch [ 12544898 ]
          Brock Noland made changes -
          Summary StressSource Batching bug StressSource batching does not work unless maxTotalEvents is specified
          Description
          {noformat}
          java.lang.IllegalArgumentException: fromIndex(0) > toIndex(-1002)
          at java.util.SubList.<init>(AbstractList.java:604)
          at java.util.RandomAccessSubList.<init>(AbstractList.java:758)
          at java.util.AbstractList.subList(AbstractList.java:468)
          at org.apache.flume.source.StressSource.process(StressSource.java:119)
          at org.apache.flume.source.PollableSourceRunner$PollingRunner.run(PollableSourceRunner.java:139)
          at java.lang.Thread.run(Thread.java:662)

          {noformat}
          {noformat}
          java.lang.IllegalArgumentException: fromIndex(0) > toIndex(-1002)
          at java.util.SubList.<init>(AbstractList.java:604)
          at java.util.RandomAccessSubList.<init>(AbstractList.java:758)
          at java.util.AbstractList.subList(AbstractList.java:468)
          at org.apache.flume.source.StressSource.process(StressSource.java:119)
          at org.apache.flume.source.PollableSourceRunner$PollingRunner.run(PollableSourceRunner.java:139)
          at java.lang.Thread.run(Thread.java:662)

          {noformat}
          Hide
          Brock Noland added a comment -
          Show
          Brock Noland added a comment - Committed here! https://git-wip-us.apache.org/repos/asf?p=flume.git;a=commit;h=466c519023028a4c72137c4a1063fd6296825e34 Thank you for your contribution Ted!
          Brock Noland made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s v1.3.0 [ 12322140 ]
          Resolution Fixed [ 1 ]
          Hide
          Hudson added a comment -

          Integrated in flume-trunk #306 (See https://builds.apache.org/job/flume-trunk/306/)
          FLUME-1570: StressSource batching does not work unless maxTotalEvents is specified (Revision 466c519023028a4c72137c4a1063fd6296825e34)

          Result = SUCCESS
          brock : http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=466c519023028a4c72137c4a1063fd6296825e34
          Files :

          • flume-ng-core/src/main/java/org/apache/flume/source/StressSource.java
          • flume-ng-core/src/test/java/org/apache/flume/source/TestStressSource.java
          Show
          Hudson added a comment - Integrated in flume-trunk #306 (See https://builds.apache.org/job/flume-trunk/306/ ) FLUME-1570 : StressSource batching does not work unless maxTotalEvents is specified (Revision 466c519023028a4c72137c4a1063fd6296825e34) Result = SUCCESS brock : http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=466c519023028a4c72137c4a1063fd6296825e34 Files : flume-ng-core/src/main/java/org/apache/flume/source/StressSource.java flume-ng-core/src/test/java/org/apache/flume/source/TestStressSource.java
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          6d 24m 1 Brock Noland 18/Sep/12 19:28

            People

            • Assignee:
              Ted Malaska
              Reporter:
              Brock Noland
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development