예제 #1
0
 def runTest(self):
     code, out, err = cloudshell.run(self.username, self.password,
                                     'table accumulo.metadata\nscan\n')
     self.assertEqual(
         code, 0, "Could not scan the metadata table. %s %s" % (out, err))
     results = runAll(
         'echo help | %s shell -u %s -p %s' %
         (accumulo('bin', 'accumulo'), self.username, self.password))
예제 #2
0
def run(username, password, input):
    "Run a command in accumulo"
    handle = runner.start([path.accumulo('bin', 'accumulo'), 'shell -u %s -p %s' % (username, password) ],
                          stdin=subprocess.PIPE)
    log.debug("Running: %r", input)
    out, err = handle.communicate(input)
    log.debug("Process finished: %d (%s)",
              handle.returncode,
              ' '.join(handle.command))
    return handle.returncode, out, err
예제 #3
0
def run(username, password, input):
    "Run a command in accumulo"
    handle = runner.start([
        path.accumulo('bin', 'accumulo'), 'shell', '-u', username, '-p',
        password
    ],
                          stdin=subprocess.PIPE)
    log.debug("Running: %r", input)
    out, err = handle.communicate(input)
    log.debug("Process finished: %d (%s)", handle.returncode,
              ' '.join(handle.command))
    return handle.returncode, out, err
예제 #4
0
 def runTest(self):
     commands = {}
     for i, s in enumerate(slaveNames()):
         commands[
             s] = '%s %s -u %s -p %s --size %d --random %d --rows %d --start %d --cols %d' % (
                 accumulo('bin', 'accumulo'),
                 'org.apache.accumulo.test.TestIngest',
                 self.username, self.password, self.size(), self.random(),
                 self.count(), i * self.count(), 1)
     results = runEach(commands)
     codes = {}
     for slave, (code, out, err) in results.items():
         codes.setdefault(code, [])
         codes[code].append(slave)
     for code, slaves in codes.items():
         if code != 0:
             self.assertEqual(
                 code, 0,
                 "Bad exit code (%d) from slaves %r" % (code, slaves))
예제 #5
0
 def runTest(self):
     commands = {}
     for i, s in enumerate(slaveNames()):
         commands[s] = '%s %s -u %s -p %s --size %d --random %d --rows %d --start %d --cols %d' % (
             accumulo('bin', 'accumulo'),
             'org.apache.accumulo.test.TestIngest',
             self.username, self.password,
             self.size(),
             self.random(),
             self.count(),
             i*self.count(),
             1)
     results = runEach(commands)
     codes = {}
     for slave, (code, out, err) in results.items():
         codes.setdefault(code, [])
         codes[code].append(slave)
     for code, slaves in codes.items():
         if code != 0:
             self.assertEqual(code, 0, "Bad exit code (%d) from slaves %r" % (code, slaves))
예제 #6
0
 def runTest(self):
     commands = {}
     for i, s in enumerate(slaveNames()):
         commands[
             s] = '%s %s -username %s -password %s -size %d -random %d %d %d %d' % (
                 accumulo('bin', 'accumulo'),
                 'org.apache.accumulo.server.test.TestIngest',
                 self.username, self.password, self.size(), self.random(),
                 self.count(), i * self.count(), 1)
     results = runEach(commands)
     codes = {}
     for slave, (code, out, err) in results.items():
         codes.setdefault(code, [])
         codes[code].append(slave)
     for code, slaves in codes.items():
         if code != 0:
             self.assertEqual(
                 code, 0,
                 "Bad exit code (%d) from slaves %r" % (code, slaves))
     command = 'deletetable test_ingest\n'
     log.debug("Running Command %r", command)
     code, out, err = cloudshell.run(self.username, self.password, command)
예제 #7
0
 def runTest(self):
     commands = {}
     for i, s in enumerate(slaveNames()):
         commands[s] = '%s %s -username %s -password %s -size %d -random %d %d %d %d' % (
             accumulo('bin', 'accumulo'),
             'org.apache.accumulo.server.test.TestIngest',
             self.username, self.password,
             self.size(),
             self.random(),
             self.count(),
             i*self.count(),
             1)
     results = runEach(commands)
     codes = {}
     for slave, (code, out, err) in results.items():
         codes.setdefault(code, [])
         codes[code].append(slave)
     for code, slaves in codes.items():
         if code != 0:
             self.assertEqual(code, 0, "Bad exit code (%d) from slaves %r" % (code, slaves))
     command = 'deletetable test_ingest\n'
     log.debug("Running Command %r", command)
     code, out, err = cloudshell.run(self.username, self.password, command)
예제 #8
0
def slaveNames():
    return [s.strip() for s in open(accumulo('conf', 'slaves'))]
예제 #9
0
 def runTest(self):
     code, out, err = cloudshell.run(self.username, self.password,
                                     'table !METADATA\nscan\n')
     results = runAll('echo help | %s shell' % accumulo('bin', 'accumulo'))
예제 #10
0
 def runTest(self):
     code, out, err = cloudshell.run(self.username, self.password, 'table accumulo.metadata\nscan\n')
     self.assertEqual(code, 0, "Could not scan the metadata table. %s %s" % (out, err))
     results = runAll('echo help | %s shell -u %s -p %s' %
                      (accumulo('bin', 'accumulo'), self.username, self.password))
예제 #11
0
 def runTest(self):
     code, out, err = cloudshell.run(self.username, self.password,
                                     'table !METADATA\nscan\n')
     self.assertEqual(
         code, 0, "Could not scan the !METADATA table. %s %s" % (out, err))
     results = runAll('echo help | %s shell' % accumulo('bin', 'accumulo'))
예제 #12
0
 def runTest(self):
     code, out, err = cloudshell.run(self.username, self.password, 'table !METADATA\nscan\n')
     results = runAll('echo help | %s shell' %
                      accumulo('bin', 'accumulo'))
예제 #13
0
 def runTest(self):
     code, out, err = cloudshell.run(self.username, self.password, 'table !METADATA\nscan\n')
     self.assertEqual(code, 0, "Could not scan the !METADATA table. %s %s" % (out, err))
     results = runAll('echo help | %s shell' %
                      accumulo('bin', 'accumulo'))
예제 #14
0
def slaveNames():
    return [s.strip() for s in open(accumulo('conf', 'slaves'))]