Beispiel #1
0
 def testByFunction(self):
     expectedOutput = "attempt_local1340085606_0004_m_000000_0, 157036000, 320, 490737.5"
     tf = tempfile.NamedTemporaryFile(delete=False)
     filename = tf.name
     kijistats.main([
         './kijistats', '--stats-dir', self.input_dir, '--by-function',
         'getSchemaEntry', '--to-file', filename
     ])
     with open(filename) as f:
         for line in f:
             if "attempt_local1340085606_0004_m_000000_0" in line:
                 self.assertEqual(expectedOutput, line.rstrip())
                 return
     self.fail("Expected line not found in output")
Beispiel #2
0
 def testByJobID(self):
     expectedOutput = "public synchronized org.kiji.schema.KijiSchemaTable.SchemaEntry " + \
         "org.kiji.schema.impl.HBaseSchemaTable.getSchemaEntry(org.kiji.schema.util.BytesKey)," + \
         " 157036000, 320, 490737.5"
     tf = tempfile.NamedTemporaryFile(delete=False)
     filename = tf.name
     kijistats.main([
         './kijistats', '--stats-dir', self.input_dir, '--by-job',
         'job_local1340085606_0004', '--to-file', filename
     ])
     with open(filename) as f:
         for line in f:
             if "getSchemaEntry" in line:
                 self.assertEqual(expectedOutput, line.rstrip())
                 return
     self.fail("Expected line not found in output")
Beispiel #3
0
 def testByJobName(self):
     expectedOutput = "public synchronized org.kiji.schema.KijiSchemaTable.SchemaEntry " + \
         "org.kiji.schema.impl.HBaseSchemaTable.getSchemaEntry(org.kiji.schema.util.BytesKey)," + \
         " 278514701, 875, 709618.05"
     tf = tempfile.NamedTemporaryFile(delete=False)
     filename = tf.name
     kijistats.main([
         './kijistats.py', '--stats-dir', self.input_dir, '--by-jobname',
         'TestingGatherer', '--to-file', filename
     ])
     with open(filename) as f:
         for line in f:
             if "getSchemaEntry" in line:
                 self.assertEqual(expectedOutput, line.rstrip())
                 return
     self.fail("Expected line not found in output")
 def testByFunction(self):
     expectedOutput = "attempt_local1340085606_0004_m_000000_0, 157036000, 320, 490737.5"
     tf = tempfile.NamedTemporaryFile(delete=False)
     filename = tf.name
     kijistats.main(['./kijistats',
                     '--stats-dir',
                     self.input_dir,
                     '--by-function',
                     'getSchemaEntry',
                     '--to-file',
                     filename])
     with open(filename) as f:
         for line in f:
             if "attempt_local1340085606_0004_m_000000_0" in line:
                 self.assertEqual(expectedOutput, line.rstrip())
                 return
     self.fail("Expected line not found in output")
 def testByJobID(self):
     expectedOutput = "public synchronized org.kiji.schema.KijiSchemaTable.SchemaEntry " + \
         "org.kiji.schema.impl.HBaseSchemaTable.getSchemaEntry(org.kiji.schema.util.BytesKey)," + \
         " 157036000, 320, 490737.5"
     tf = tempfile.NamedTemporaryFile(delete=False)
     filename = tf.name
     kijistats.main(['./kijistats',
                     '--stats-dir',
                     self.input_dir,
                     '--by-job',
                     'job_local1340085606_0004',
                     '--to-file',
                     filename])
     with open(filename) as f:
         for line in f:
             if "getSchemaEntry" in line:
                 self.assertEqual(expectedOutput, line.rstrip())
                 return
     self.fail("Expected line not found in output")
 def testByJobName(self):
     expectedOutput = "public synchronized org.kiji.schema.KijiSchemaTable.SchemaEntry " + \
         "org.kiji.schema.impl.HBaseSchemaTable.getSchemaEntry(org.kiji.schema.util.BytesKey)," + \
         " 278514701, 875, 709618.05"
     tf = tempfile.NamedTemporaryFile(delete=False)
     filename = tf.name
     kijistats.main(['./kijistats.py',
                     '--stats-dir',
                     self.input_dir,
                     '--by-jobname',
                     'TestingGatherer',
                     '--to-file',
                     filename])
     with open(filename) as f:
         for line in f:
             if "getSchemaEntry" in line:
                 self.assertEqual(expectedOutput, line.rstrip())
                 return
     self.fail("Expected line not found in output")