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