Uploaded image for project: 'Sqoop (Retired)'
  1. Sqoop (Retired)
  2. SQOOP-1362

TestImportJob getContent method doesn't work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.4
    • 1.4.5
    • None
    • None

    Description

      Example:

      try {
            int ret = Sqoop.runSqoop(importer, argv);
            assertTrue("Expected job to go through if target directory"
              + " does not exist.", 0 == ret);
            assertTrue(fs.exists(outputPath));
            // expecting one _SUCCESS file and one file containing data
            assertTrue("Expecting two files in the directory.",
                fs.listStatus(outputPath).length == 2);
            String[] output = getContent(conf, outputPath);
            assertEquals("Expected output and actual output should be same.", "meep\n",
                output[0]);
      
            ret = Sqoop.runSqoop(importer, argv);
            assertTrue("Expected job to go through if target directory exists.",
              0 == ret);
            assertTrue(fs.exists(outputPath));
            // expecting one _SUCCESS file and one file containing data
            assertTrue("Expecting two files in the directory.",
                fs.listStatus(outputPath).length == 2);
            output = getContent(conf, outputPath);
            assertEquals("Expected output and actual output should be same.", "meep\n",
                output[0]);
          } catch (Exception e) {
            // In debug mode, ImportException is wrapped in RuntimeException.
            LOG.info("Got exceptional return (expected: ok). msg is: " + e);
          }
      

      Attachments

        1. SQOOP-1362.0.patch
          4 kB
          Abraham Elmahrek

        Issue Links

          Activity

            People

              abec Abraham Elmahrek
              abec Abraham Elmahrek
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: