Flume
  1. Flume
  2. FLUME-1670

AvroClient/Agent should return with valid error code when it terminates in error state

    Details

    • Type: Bug Bug
    • Status: Patch Available
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: v1.4.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    1. FLUME-1670-1.patch
      2 kB
      Johny Rufus
    2. FLUME-1670.patch
      5 kB
      Paul Chavez

      Activity

      Hari Shreedharan created issue -
      Hide
      Paul Chavez added a comment -

      Simple patch to add exit codes to AvroCLIClient class in case of exit in error state.

      Show
      Paul Chavez added a comment - Simple patch to add exit codes to AvroCLIClient class in case of exit in error state.
      Paul Chavez made changes -
      Field Original Value New Value
      Status Open [ 1 ] Patch Available [ 10002 ]
      Affects Version/s v1.4.0 [ 12323372 ]
      Hide
      Paul Chavez added a comment -

      Patch to return a non-zero code when an exception occurs.

      Show
      Paul Chavez added a comment - Patch to return a non-zero code when an exception occurs.
      Paul Chavez made changes -
      Attachment avroCLI-exit-codes.patch [ 12551613 ]
      Hide
      Hari Shreedharan added a comment -

      Paul,

      The patch looks good. Can you take a look at org.apache.flume.node - Application.java, which is the flume agent application. It'd be great if you could make similar changes to that as well.

      Show
      Hari Shreedharan added a comment - Paul, The patch looks good. Can you take a look at org.apache.flume.node - Application.java, which is the flume agent application. It'd be great if you could make similar changes to that as well.
      Hide
      Paul Chavez added a comment -

      Yes, I will take a look in the next couple days.

      Show
      Paul Chavez added a comment - Yes, I will take a look in the next couple days.
      Hide
      Paul Chavez added a comment -

      Add exit codes for flume node as well.

      Show
      Paul Chavez added a comment - Add exit codes for flume node as well.
      Paul Chavez made changes -
      Attachment flume-node-exit-codes.patch [ 12551758 ]
      Hide
      Paul Chavez added a comment -

      I have attached a patch for the flume node to exit with error codes if an exception occurred. This was not as straightforward for me, I don't entirely understand the lifecycle stuff. I verified this builds but did not test.

      Show
      Paul Chavez added a comment - I have attached a patch for the flume node to exit with error codes if an exception occurred. This was not as straightforward for me, I don't entirely understand the lifecycle stuff. I verified this builds but did not test.
      Hide
      Mike Percy added a comment -

      Hi Paul,
      Would you mind making the following changes?

      1. Use exit code 1 for all errors and exit code 0 for success. Otherwise we are defining an interface with these error codes and I don't think we're ready to go there yet. Also, we should catch Throwable and exit 1 on that one too.
      2. Combine all of the diffs from all files into a single .patch file on this JIRA.
      Show
      Mike Percy added a comment - Hi Paul, Would you mind making the following changes? Use exit code 1 for all errors and exit code 0 for success. Otherwise we are defining an interface with these error codes and I don't think we're ready to go there yet. Also, we should catch Throwable and exit 1 on that one too. Combine all of the diffs from all files into a single .patch file on this JIRA.
      Hide
      Paul Chavez added a comment -

      Updated patch file per Mike Percy's request.

      Show
      Paul Chavez added a comment - Updated patch file per Mike Percy's request.
      Paul Chavez made changes -
      Attachment FLUME-1670.patch [ 12563791 ]
      Paul Chavez made changes -
      Attachment avroCLI-exit-codes.patch [ 12551613 ]
      Paul Chavez made changes -
      Attachment flume-node-exit-codes.patch [ 12551758 ]
      Hide
      Johny Rufus added a comment -

      Attaching rebased/adjusted patch based on Paul Chavez's patch

      Show
      Johny Rufus added a comment - Attaching rebased/adjusted patch based on Paul Chavez 's patch
      Johny Rufus made changes -
      Attachment FLUME-1670-1.patch [ 12761520 ]
      Transition Time In Source Status Execution Times Last Executer Last Execution Date
      Open Open Patch Available Patch Available
      23h 28m 1 Paul Chavez 31/Oct/12 18:14

        People

        • Assignee:
          Unassigned
          Reporter:
          Hari Shreedharan
        • Votes:
          0 Vote for this issue
          Watchers:
          4 Start watching this issue

          Dates

          • Created:
            Updated:

            Development