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

      Activity

      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.
      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.
      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.
      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.

        People

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

          Dates

          • Created:
            Updated:

            Development