Example #1
0
 def setUp(self):
     random.jumpahead(int(time.time()))
     num = random.randint(1, 100000)
     self.input_table = self.input_table + "_" + str(num)
     self.output_table = self.output_table + "_" + str(num)
     #if (not os.getenv("HADOOP_CLASSPATH")):
     #    os.putenv("HADOOP_CLASSPATH", self.getjars(":"))
     dir = os.path.dirname(os.path.realpath(__file__))
     file = os.path.join(dir, 'splits')
     # code, out, err = cloudshell.run(self.username, self.password, 'table RowHashTestInput\n')
     # if out.find('no such table') == -1:
     #    code, out, err = cloudshell.run(self.username, self.password, 'deletetable RowHashTestInput\n')
     #    self.sleep(15)
     code, out, err = cloudshell.run(
         self.username, self.password,
         "createtable %s -sf %s\n" % (self.input_table, file))
     #code, out, err = cloudshell.run('table RowHashTest\n')
     #if out.find('no such table') == -1:
     #    code, out, err = cloudshell.run('user root\nsecret\ndeletetable RowHashTest\n')
     #    self.sleep(15)
     code, out, err = cloudshell.run(
         self.username, self.password,
         "createtable %s -sf %s\n" % (self.output_table, file))
     command = self.buildcommand(
         'org.apache.accumulo.examples.simple.mapreduce.TeraSortIngest',
         self.numrows(), self.keysizemin(), self.keysizemax(),
         self.minvaluesize(), self.maxvaluesize(), self.input_table,
         self.getInstance(), self.getZookeepers(), self.getUsername(),
         self.getPassword(), self.maxmaps)
     handle = runner.start(command, stdin=subprocess.PIPE)
     log.debug("Running: %r", command)
     out, err = handle.communicate("")
     Benchmark.setUp(self)
Example #2
0
 def setUp(self): 
     random.jumpahead(int(time.time()))
     num = random.randint(1, 100000)
     self.input_table = self.input_table + "_" + str(num) 
     self.output_table = self.output_table + "_" + str(num)    
     #if (not os.getenv("HADOOP_CLASSPATH")):
     #    os.putenv("HADOOP_CLASSPATH", self.getjars(":"))
     dir = os.path.dirname(os.path.realpath(__file__))
     file = os.path.join( dir, 'splits' )  
     # code, out, err = cloudshell.run(self.username, self.password, 'table RowHashTestInput\n') 
     # if out.find('no such table') == -1:
     #    code, out, err = cloudshell.run(self.username, self.password, 'deletetable RowHashTestInput\n') 
     #    self.sleep(15)
     code, out, err = cloudshell.run(self.username, self.password, "createtable %s -sf %s\n" % (self.input_table, file))
     #code, out, err = cloudshell.run('table RowHashTest\n') 
     #if out.find('no such table') == -1:
     #    code, out, err = cloudshell.run('user root\nsecret\ndeletetable RowHashTest\n') 
     #    self.sleep(15)
     code, out, err = cloudshell.run(self.username, self.password, "createtable %s -sf %s\n" % (self.output_table, file))
     command = self.buildcommand('org.apache.accumulo.examples.simple.mapreduce.TeraSortIngest',
                                 self.numrows(),
                                 self.keysizemin(),
                                 self.keysizemax(),
                                 self.minvaluesize(),
                                 self.maxvaluesize(),
                                 self.input_table, 
                                 self.getInstance(),
                                 self.getZookeepers(),
                                 self.getUsername(),
                                 self.getPassword(),
                                 self.maxmaps)
     handle = runner.start(command, stdin=subprocess.PIPE)
     log.debug("Running: %r", command)
     out, err = handle.communicate("")  
     Benchmark.setUp(self)
Example #3
0
 def setUp(self): 
     dir = os.path.dirname(os.path.realpath(__file__))
     file = os.path.join( dir, 'splits' )  
     code, out, err = cloudshell.run(self.username, self.password, 'table %s\n' % self.input_table) 
     if out.find('does not exist') == -1:
        code, out, err = cloudshell.run(self.username, self.password, 'deletetable -f %s\n' % self.input_table) 
        self.sleep(15)
     code, out, err = cloudshell.run(self.username, self.password, "createtable %s -sf %s\n" % (self.input_table, file))
     code, out, err = cloudshell.run(self.username, self.password, 'table %s\n' % self.output_table) 
     if out.find('does not exist') == -1:
         code, out, err = cloudshell.run(self.username, self.password, 'deletetable -f %s\n' %
                 self.output_table) 
         self.sleep(15)
     code, out, err = cloudshell.run(self.username, self.password, "createtable %s -sf %s\n" % (self.output_table, file))
     command = self.buildcommand('org.apache.accumulo.examples.simple.mapreduce.TeraSortIngest',
                                 '--count', self.numrows(),
                                 '-nk', self.keysizemin(),
                                 '-xk', self.keysizemax(),
                                 '-nv', self.minvaluesize(),
                                 '-xv', self.maxvaluesize(),
                                 '--table', self.input_table, 
                                 '-i', self.getInstance(),
                                 '-z', self.getZookeepers(),
                                 '-u', self.getUsername(),
                                 '-p', self.getPassword(),
                                 '--splits', self.maxmaps)
     handle = runner.start(command, stdin=subprocess.PIPE)
     log.debug("Running: %r", command)
     out, err = handle.communicate("")  
     Benchmark.setUp(self)
 def setUp(self): 
     # Need to generate a splits file for each speed
     code, out, err = cloudshell.run(self.username, self.password, 'table %s\n' % self.tablename)
     if out.find('does not exist') == -1:
         log.debug('Deleting table %s' % self.tablename)
         code, out, err = cloudshell.run(self.username, self.password, 'deletetable %s -f\n' % self.tablename)
         self.assertEqual(code, 0, "Could not delete table")
     Benchmark.setUp(self)
 def setUp(self): 
     # Need to generate a splits file for each speed
     code, out, err = cloudshell.run(self.username, self.password, 'table %s\n' % self.tablename)
     if out.find('does not exist') == -1:
         log.debug('Deleting table %s' % self.tablename)
         code, out, err = cloudshell.run(self.username, self.password, 'deletetable %s -f\n' % self.tablename)
         self.assertEqual(code, 0, "Could not delete table")
     Benchmark.setUp(self)
Example #6
0
 def setUp(self):
     code, out, err = cloudshell.run(self.username, self.password, 'table test_ingest\n')
     if out.find('does not exist') == -1:
         log.debug("Deleting table test_ingest")
         code, out, err = cloudshell.run(self.username, self.password, 'deletetable test_ingest -f\n')
         self.assertEquals(code, 0, "Could not delete the table 'test_ingest'")
     code, out, err = cloudshell.run(self.username, self.password, 'createtable test_ingest\n')
     self.assertEqual(code, 0, "Could not create the table 'test_ingest'")
     Benchmark.setUp(self)
 def setUp(self):
     code, out, err = cloudshell.run(self.username, self.password,
                                     'table %s\n' % self.tablename)
     if out.find('does not exist') == -1:
         log.debug('Deleting table %s' % self.tablename)
         code, out, err = cloudshell.run(
             self.username, self.password,
             'deletetable -f %s\n' % self.tablename)
     Benchmark.setUp(self)
Example #8
0
 def setUp(self):
     code, out, err = cloudshell.run(self.username, self.password, 'table test_ingest\n')
     if out.find('no such table') >= 0:
         log.debug("Deleting table test_ingest")
         code, out, err = cloudshell.run(self.username, self.password, 'deletetable test_ingest\n')
         self.sleep(10)
     code, out, err = cloudshell.run(self.username, self.password, 'createtable test_ingest\n')
     self.assertEqual(code, 0)
     Benchmark.setUp(self)
 def setUp(self): 
     random.jumpahead(int(time.time()))
     num = random.randint(1, 100000)   
     #self.tablename = self.tablename + "-" + str(num)  
     # Find which hadoop version
     # code, out, err = cloudshell.run(self.username, self.password, 'table %s\n' % self.tablename)
     #if out.find('no such table') == -1:
     #    log.debug('Deleting table %s' % self.tablename)
     #    code, out, err = cloudshell.run(self.username, self.password, 'deletetable %s\n' % self.tablename)
     #    self.sleep(10)
     Benchmark.setUp(self)
 def setUp(self): 
     for x in range(1, self.tables):
         currentTable = 'test_ingest%d' % (x)      
         log.debug("Checking for table existence: %s" % currentTable)
         code, out, err = cloudshell.run(self.username, self.password, 'table %s\n' % currentTable)
         if out.find('does not exist') == -1:
             command = 'deletetable -f %s\n' % (currentTable)
             log.debug("Running Command %r", command)
             code, out, err = cloudshell.run(self.username, self.password, command)
             self.assertEqual(code, 0, 'Did not successfully delete table: %s' % currentTable)
     Benchmark.setUp(self)  
Example #11
0
 def setUp(self):
     code, out, err = cloudshell.run(self.username, self.password,
                                     'table test_ingest\n')
     if out.find('no such table') >= 0:
         log.debug("Deleting table test_ingest")
         code, out, err = cloudshell.run(self.username, self.password,
                                         'deletetable test_ingest\n')
         self.sleep(10)
     code, out, err = cloudshell.run(self.username, self.password,
                                     'createtable test_ingest\n')
     self.assertEqual(code, 0)
     Benchmark.setUp(self)
 def setUp(self): 
     random.jumpahead(int(time.time()))
     num = random.randint(1, 100000)
     self.tablename = self.tablename + "_" + str(num)     
     # Need to generate a splits file for each speed
     #code, out, err = cloudshell.run(self.username, self.password, 'table %s\n' % self.tablename)
     #if out.find('no such table') == -1:
     #    log.debug('Deleting table %s' % self.tablename)
     #    code, out, err = cloudshell.run('user %s\n%s\ndeletetable %s\n' % (self.user, 
     #                                                                          self.password, 
     #                                                                          self.tablename))
     #    self.sleep(5)
     Benchmark.setUp(self)
Example #13
0
 def setUp(self):
     code, out, err = cloudshell.run(self.username, self.password,
                                     'table test_ingest\n')
     if out.find('does not exist') == -1:
         log.debug("Deleting table test_ingest")
         code, out, err = cloudshell.run(self.username, self.password,
                                         'deletetable test_ingest -f\n')
         self.assertEquals(code, 0,
                           "Could not delete the table 'test_ingest'")
     code, out, err = cloudshell.run(self.username, self.password,
                                     'createtable test_ingest\n')
     self.assertEqual(code, 0, "Could not create the table 'test_ingest'")
     Benchmark.setUp(self)
Example #14
0
 def setUp(self):
     for x in range(1, self.tables):
         currentTable = 'test_ingest%d' % (x)
         log.debug("Checking for table existence: %s" % currentTable)
         code, out, err = cloudshell.run(self.username, self.password,
                                         'table %s\n' % currentTable)
         if out.find('does not exist') == -1:
             command = 'deletetable -f %s\n' % (currentTable)
             log.debug("Running Command %r", command)
             code, out, err = cloudshell.run(self.username, self.password,
                                             command)
             self.assertEqual(
                 code, 0,
                 'Did not successfully delete table: %s' % currentTable)
     Benchmark.setUp(self)
 def setUp(self): 
     Benchmark.setUp(self)  
Example #16
0
 def setUp(self): 
     code, out, err = cloudshell.run(self.username, self.password, 'table %s\n' % self.tablename)
     if out.find('does not exist') == -1:
         log.debug('Deleting table %s' % self.tablename)
         code, out, err = cloudshell.run(self.username, self.password, 'deletetable -f %s\n' % self.tablename)
     Benchmark.setUp(self)
Example #17
0
 def setUp(self):
     code, out, err = cloudshell.run(self.username, self.password, "table %s\n" % self.tablename)
     if out.find("does not exist") == -1:
         log.debug("Deleting table %s" % self.tablename)
         code, out, err = cloudshell.run(self.username, self.password, "deletetable -f %s\n" % self.tablename)
     Benchmark.setUp(self)