Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-12550

hostnames with a dot never receive local input splits

    XMLWordPrintableJSON

    Details

      Description

      LocatableInputSplitAssigner (in package api.common.io) fails to assign local input splits to hosts whose hostname contains a dot ("."). To reproduce add the following test to LocatableSplitAssignerTest and execute it. It will always fail. In my mind, this is contrary to the expected behaviour, which is that the host should obtain the one split that is stored on the very same machine.

       

      @Test
      public void testLocalSplitAssignmentForHostWithDomainName() {
         try {
            String hostNameWithDot = "testhost.testdomain";
      
            // load one split
            Set<LocatableInputSplit> splits = new HashSet<LocatableInputSplit>();
            splits.add(new LocatableInputSplit(0, hostNameWithDot));
      
            // get next split for the host
            LocatableInputSplitAssigner ia = new LocatableInputSplitAssigner(splits);
            InputSplit is = null;
            ia.getNextInputSplit(hostNameWithDot, 0);
      
            // there should be exactly zero remote and one local assignment
            assertEquals(0, ia.getNumberOfRemoteAssignments());
            assertEquals(1, ia.getNumberOfLocalAssignments());
         }
         catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
         }
      }
      

      I also experienced this error in practice, and will later today open a pull request to fix it.

       

      Note: I'm not sure if I selected the correct component category.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                felxe Felix seibert
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m