Uploaded image for project: 'Giraph'
  1. Giraph
  2. GIRAPH-884

ByteArrayEdges.iterator() throws NPE when no edges are present

    XMLWordPrintableJSON

    Details

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

      Description

      The ByteArrayEdges.iterator() method throws the following NPE when no edges are present:

      2014-03-31 14:44:46,273 ERROR org.apache.giraph.utils.LogStacktraceCallable: Execution of callable failed
      java.lang.NullPointerException
      at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:120)
      at org.apache.giraph.utils.ExtendedByteArrayDataInput.<init>(ExtendedByteArrayDataInput.java:50)
      at org.apache.giraph.conf.ImmutableClassesGiraphConfiguration.createExtendedDataInput(ImmutableClassesGiraphConfiguration.java:1009)
      at org.apache.giraph.edge.ByteArrayEdges$ByteArrayEdgeIterator.<init>(ByteArrayEdges.java:141)
      at org.apache.giraph.edge.ByteArrayEdges$ByteArrayEdgeIterator.<init>(ByteArrayEdges.java:138)
      at org.apache.giraph.edge.ByteArrayEdges.iterator(ByteArrayEdges.java:167)

      Simply checking the edgeCount before constructing a new ByteArrayEdgeIterator solves the problem.

        Attachments

        1. GIRAPH-884.patch
          0.9 kB
          Craig Muchinsky

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cmuchinsky@initiatesystems.com Craig Muchinsky
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: