Apache S4
  1. Apache S4
  2. S4-127

S4 status error due to invalid parsing

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.6
    • Labels:
      None

      Description

      (from s4-dev mailing list, reported by Dingyu Yang):

      I find a problem that I have a app ,which includes multiple streams. They
      can merge into a stream, and a stream goes into multiple PEs.
      Then the s4 status command can not display.
      Cannot get the status of S4.

      11:09:56.308 [main] ERROR org.apache.s4.tools.Status - Cannot get the
      status of S4
      java.util.FormatFlagsConversionMismatchException: Conversion = s, Flags = 0
      at java.util.Formatter$FormatSpecifier.failMismatch(Formatter.java:3995)
      ~[na:1.6.0_22]
      at java.util.Formatter$FormatSpecifier.checkBadFlags(Formatter.java:2905)
      ~[na:1.6.0_22]
      at java.util.Formatter$FormatSpecifier.checkGeneral(Formatter.java:2863)
      ~[na:1.6.0_22]
      at java.util.Formatter$FormatSpecifier.<init>(Formatter.java:2639)
      ~[na:1.6.0_22]
      at java.util.Formatter.parse(Formatter.java:2480) ~[na:1.6.0_22]
      at java.util.Formatter.format(Formatter.java:2414) ~[na:1.6.0_22]
      at java.util.Formatter.format(Formatter.java:2367) ~[na:1.6.0_22]
      at java.lang.String.format(String.java:2769) ~[na:1.6.0_22]
      at org.apache.s4.tools.Status.inMiddle(Status.java:209)
      ~[s4-tools-0.5.0-incubating.jar:0.5.0-incubating]
      at org.apache.s4.tools.Status.showStreamsStatus(Status.java:199)
      ~[s4-tools-0.5.0-incubating.jar:0.5.0-incubating]
      at org.apache.s4.tools.Status.main(Status.java:119)
      ~[s4-tools-0.5.0-incubating.jar:0.5.0-incubating]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      ~[na:1.6.0_22]
      at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      ~[na:1.6.0_22]
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      ~[na:1.6.0_22]
      at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_22]
      at org.apache.s4.tools.Tools$Task.dispatch(Tools.java:54)
      [s4-tools-0.5.0-incubating.jar:0.5.0-incubating]
      at org.apache.s4.tools.Tools.main(Tools.java:94)
      [s4-tools-0.5.0-incubating.jar:0.5.0-incubating]

        Activity

        Hide
        Matthieu Morel added a comment - - edited

        Due to String formatting in Status.inMiddle method. Reproducible with X=0 in String.format("%Xs%s", s1, s2);

        In the user report, corresponds to a length of 20 for the stream name

        Show
        Matthieu Morel added a comment - - edited Due to String formatting in Status.inMiddle method. Reproducible with X=0 in String.format("%Xs%s", s1, s2); In the user report, corresponds to a length of 20 for the stream name
        Hide
        Matthieu Morel added a comment -

        uploaded patch in branch S4-127 commit a5aacb19ff7000391f65b6c44248c218e8c13f64

        Show
        Matthieu Morel added a comment - uploaded patch in branch S4-127 commit a5aacb19ff7000391f65b6c44248c218e8c13f64
        Hide
        Daniel Gómez Ferro added a comment -

        I merged this into dev, but there was a small problem I overlooked

        I pushed a fix to the problem in branch S4-127

        Show
        Daniel Gómez Ferro added a comment - I merged this into dev, but there was a small problem I overlooked I pushed a fix to the problem in branch S4-127
        Hide
        Matthieu Morel added a comment - - edited

        +1 nicely spotted Daniel, I added a "take 2" merge to include your changes, thanks!

        Merged in dev, commit faf0da4

        Show
        Matthieu Morel added a comment - - edited +1 nicely spotted Daniel, I added a "take 2" merge to include your changes, thanks! Merged in dev, commit faf0da4

          People

          • Assignee:
            Matthieu Morel
            Reporter:
            Matthieu Morel
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development