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))
Exemple #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
Exemple #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
Exemple #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))
 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))
Exemple #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)
Exemple #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)
Exemple #8
0
def slaveNames():
    return [s.strip() for s in open(accumulo('conf', 'slaves'))]
Exemple #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'))
Exemple #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))
Exemple #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'))
Exemple #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'))
Exemple #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'))
Exemple #14
0
def slaveNames():
    return [s.strip() for s in open(accumulo('conf', 'slaves'))]