Browse Source

HUE-790 [jobsub] Remove old files from Hue1

Romain Rigaux 13 years ago
parent
commit
d26ce2b

+ 0 - 0
apps/jobsub/gen-py/__init__.py


+ 0 - 92
apps/jobsub/gen-py/jobsubd/JobSubmissionService-remote

@@ -1,92 +0,0 @@
-#!/usr/bin/env python
-#
-# Autogenerated by Thrift
-#
-# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-#
-
-import sys
-import pprint
-from urlparse import urlparse
-from thrift.transport import TTransport
-from thrift.transport import TSocket
-from thrift.transport import THttpClient
-from thrift.protocol import TBinaryProtocol
-
-import JobSubmissionService
-from ttypes import *
-
-if len(sys.argv) <= 1 or sys.argv[1] == '--help':
-  print ''
-  print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]'
-  print ''
-  print 'Functions:'
-  print '  SubmissionHandle submit(SubmissionPlan plan)'
-  print '  JobData get_job_data(SubmissionHandle handle)'
-  print ''
-  sys.exit(0)
-
-pp = pprint.PrettyPrinter(indent = 2)
-host = 'localhost'
-port = 9090
-uri = ''
-framed = False
-http = False
-argi = 1
-
-if sys.argv[argi] == '-h':
-  parts = sys.argv[argi+1].split(':')
-  host = parts[0]
-  port = int(parts[1])
-  argi += 2
-
-if sys.argv[argi] == '-u':
-  url = urlparse(sys.argv[argi+1])
-  parts = url[1].split(':')
-  host = parts[0]
-  if len(parts) > 1:
-    port = int(parts[1])
-  else:
-    port = 80
-  uri = url[2]
-  if url[4]:
-    uri += '?%s' % url[4]
-  http = True
-  argi += 2
-
-if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed':
-  framed = True
-  argi += 1
-
-cmd = sys.argv[argi]
-args = sys.argv[argi+1:]
-
-if http:
-  transport = THttpClient.THttpClient(host, port, uri)
-else:
-  socket = TSocket.TSocket(host, port)
-  if framed:
-    transport = TTransport.TFramedTransport(socket)
-  else:
-    transport = TTransport.TBufferedTransport(socket)
-protocol = TBinaryProtocol.TBinaryProtocol(transport)
-client = JobSubmissionService.Client(protocol)
-transport.open()
-
-if cmd == 'submit':
-  if len(args) != 1:
-    print 'submit requires 1 args'
-    sys.exit(1)
-  pp.pprint(client.submit(eval(args[0]),))
-
-elif cmd == 'get_job_data':
-  if len(args) != 1:
-    print 'get_job_data requires 1 args'
-    sys.exit(1)
-  pp.pprint(client.get_job_data(eval(args[0]),))
-
-else:
-  print 'Unrecognized method %s' % cmd
-  sys.exit(1)
-
-transport.close()

+ 0 - 421
apps/jobsub/gen-py/jobsubd/JobSubmissionService.py

@@ -1,421 +0,0 @@
-#
-# Autogenerated by Thrift
-#
-# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-#
-
-from thrift.Thrift import *
-from ttypes import *
-from thrift.Thrift import TProcessor
-from thrift.transport import TTransport
-from thrift.protocol import TBinaryProtocol, TProtocol
-try:
-  from thrift.protocol import fastbinary
-except:
-  fastbinary = None
-
-
-class Iface(object):
-  def submit(self, plan):
-    """
-    Parameters:
-     - plan
-    """
-    pass
-
-  def get_job_data(self, handle):
-    """
-    Parameters:
-     - handle
-    """
-    pass
-
-
-class Client(Iface):
-  def __init__(self, iprot, oprot=None):
-    self._iprot = self._oprot = iprot
-    if oprot != None:
-      self._oprot = oprot
-    self._seqid = 0
-
-  def submit(self, plan):
-    """
-    Parameters:
-     - plan
-    """
-    self.send_submit(plan)
-    return self.recv_submit()
-
-  def send_submit(self, plan):
-    self._oprot.writeMessageBegin('submit', TMessageType.CALL, self._seqid)
-    args = submit_args()
-    args.plan = plan
-    args.write(self._oprot)
-    self._oprot.writeMessageEnd()
-    self._oprot.trans.flush()
-
-  def recv_submit(self, ):
-    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-    if mtype == TMessageType.EXCEPTION:
-      x = TApplicationException()
-      x.read(self._iprot)
-      self._iprot.readMessageEnd()
-      raise x
-    result = submit_result()
-    result.read(self._iprot)
-    self._iprot.readMessageEnd()
-    if result.success != None:
-      return result.success
-    if result.error != None:
-      raise result.error
-    raise TApplicationException(TApplicationException.MISSING_RESULT, "submit failed: unknown result");
-
-  def get_job_data(self, handle):
-    """
-    Parameters:
-     - handle
-    """
-    self.send_get_job_data(handle)
-    return self.recv_get_job_data()
-
-  def send_get_job_data(self, handle):
-    self._oprot.writeMessageBegin('get_job_data', TMessageType.CALL, self._seqid)
-    args = get_job_data_args()
-    args.handle = handle
-    args.write(self._oprot)
-    self._oprot.writeMessageEnd()
-    self._oprot.trans.flush()
-
-  def recv_get_job_data(self, ):
-    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-    if mtype == TMessageType.EXCEPTION:
-      x = TApplicationException()
-      x.read(self._iprot)
-      self._iprot.readMessageEnd()
-      raise x
-    result = get_job_data_result()
-    result.read(self._iprot)
-    self._iprot.readMessageEnd()
-    if result.success != None:
-      return result.success
-    if result.error != None:
-      raise result.error
-    raise TApplicationException(TApplicationException.MISSING_RESULT, "get_job_data failed: unknown result");
-
-
-class Processor(Iface, TProcessor):
-  def __init__(self, handler):
-    self._handler = handler
-    self._processMap = {}
-    self._processMap["submit"] = Processor.process_submit
-    self._processMap["get_job_data"] = Processor.process_get_job_data
-
-  def process(self, iprot, oprot):
-    (name, type, seqid) = iprot.readMessageBegin()
-    if name not in self._processMap:
-      iprot.skip(TType.STRUCT)
-      iprot.readMessageEnd()
-      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
-      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
-      x.write(oprot)
-      oprot.writeMessageEnd()
-      oprot.trans.flush()
-      return
-    else:
-      self._processMap[name](self, seqid, iprot, oprot)
-    return True
-
-  def process_submit(self, seqid, iprot, oprot):
-    args = submit_args()
-    args.read(iprot)
-    iprot.readMessageEnd()
-    result = submit_result()
-    try:
-      result.success = self._handler.submit(args.plan)
-    except SubmissionError, error:
-      result.error = error
-    oprot.writeMessageBegin("submit", TMessageType.REPLY, seqid)
-    result.write(oprot)
-    oprot.writeMessageEnd()
-    oprot.trans.flush()
-
-  def process_get_job_data(self, seqid, iprot, oprot):
-    args = get_job_data_args()
-    args.read(iprot)
-    iprot.readMessageEnd()
-    result = get_job_data_result()
-    try:
-      result.success = self._handler.get_job_data(args.handle)
-    except SubmissionError, error:
-      result.error = error
-    oprot.writeMessageBegin("get_job_data", TMessageType.REPLY, seqid)
-    result.write(oprot)
-    oprot.writeMessageEnd()
-    oprot.trans.flush()
-
-
-# HELPER FUNCTIONS AND STRUCTURES
-
-class submit_args(object):
-  """
-  Attributes:
-   - plan
-  """
-
-  thrift_spec = (
-    None, # 0
-    (1, TType.STRUCT, 'plan', (SubmissionPlan, SubmissionPlan.thrift_spec), None, ), # 1
-  )
-
-  def __init__(self, plan=None,):
-    self.plan = plan
-
-  def read(self, iprot):
-    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-      return
-    iprot.readStructBegin()
-    while True:
-      (fname, ftype, fid) = iprot.readFieldBegin()
-      if ftype == TType.STOP:
-        break
-      if fid == 1:
-        if ftype == TType.STRUCT:
-          self.plan = SubmissionPlan()
-          self.plan.read(iprot)
-        else:
-          iprot.skip(ftype)
-      else:
-        iprot.skip(ftype)
-      iprot.readFieldEnd()
-    iprot.readStructEnd()
-
-  def write(self, oprot):
-    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-      return
-    oprot.writeStructBegin('submit_args')
-    if self.plan != None:
-      oprot.writeFieldBegin('plan', TType.STRUCT, 1)
-      self.plan.write(oprot)
-      oprot.writeFieldEnd()
-    oprot.writeFieldStop()
-    oprot.writeStructEnd()
-    def validate(self):
-      return
-
-
-  def __repr__(self):
-    L = ['%s=%r' % (key, value)
-      for key, value in self.__dict__.iteritems()]
-    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-  def __eq__(self, other):
-    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-  def __ne__(self, other):
-    return not (self == other)
-
-class submit_result(object):
-  """
-  Attributes:
-   - success
-   - error
-  """
-
-  thrift_spec = (
-    (0, TType.STRUCT, 'success', (SubmissionHandle, SubmissionHandle.thrift_spec), None, ), # 0
-    (1, TType.STRUCT, 'error', (SubmissionError, SubmissionError.thrift_spec), None, ), # 1
-  )
-
-  def __init__(self, success=None, error=None,):
-    self.success = success
-    self.error = error
-
-  def read(self, iprot):
-    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-      return
-    iprot.readStructBegin()
-    while True:
-      (fname, ftype, fid) = iprot.readFieldBegin()
-      if ftype == TType.STOP:
-        break
-      if fid == 0:
-        if ftype == TType.STRUCT:
-          self.success = SubmissionHandle()
-          self.success.read(iprot)
-        else:
-          iprot.skip(ftype)
-      elif fid == 1:
-        if ftype == TType.STRUCT:
-          self.error = SubmissionError()
-          self.error.read(iprot)
-        else:
-          iprot.skip(ftype)
-      else:
-        iprot.skip(ftype)
-      iprot.readFieldEnd()
-    iprot.readStructEnd()
-
-  def write(self, oprot):
-    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-      return
-    oprot.writeStructBegin('submit_result')
-    if self.success != None:
-      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-      self.success.write(oprot)
-      oprot.writeFieldEnd()
-    if self.error != None:
-      oprot.writeFieldBegin('error', TType.STRUCT, 1)
-      self.error.write(oprot)
-      oprot.writeFieldEnd()
-    oprot.writeFieldStop()
-    oprot.writeStructEnd()
-    def validate(self):
-      return
-
-
-  def __repr__(self):
-    L = ['%s=%r' % (key, value)
-      for key, value in self.__dict__.iteritems()]
-    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-  def __eq__(self, other):
-    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-  def __ne__(self, other):
-    return not (self == other)
-
-class get_job_data_args(object):
-  """
-  Attributes:
-   - handle
-  """
-
-  thrift_spec = (
-    None, # 0
-    (1, TType.STRUCT, 'handle', (SubmissionHandle, SubmissionHandle.thrift_spec), None, ), # 1
-  )
-
-  def __init__(self, handle=None,):
-    self.handle = handle
-
-  def read(self, iprot):
-    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-      return
-    iprot.readStructBegin()
-    while True:
-      (fname, ftype, fid) = iprot.readFieldBegin()
-      if ftype == TType.STOP:
-        break
-      if fid == 1:
-        if ftype == TType.STRUCT:
-          self.handle = SubmissionHandle()
-          self.handle.read(iprot)
-        else:
-          iprot.skip(ftype)
-      else:
-        iprot.skip(ftype)
-      iprot.readFieldEnd()
-    iprot.readStructEnd()
-
-  def write(self, oprot):
-    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-      return
-    oprot.writeStructBegin('get_job_data_args')
-    if self.handle != None:
-      oprot.writeFieldBegin('handle', TType.STRUCT, 1)
-      self.handle.write(oprot)
-      oprot.writeFieldEnd()
-    oprot.writeFieldStop()
-    oprot.writeStructEnd()
-    def validate(self):
-      return
-
-
-  def __repr__(self):
-    L = ['%s=%r' % (key, value)
-      for key, value in self.__dict__.iteritems()]
-    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-  def __eq__(self, other):
-    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-  def __ne__(self, other):
-    return not (self == other)
-
-class get_job_data_result(object):
-  """
-  Attributes:
-   - success
-   - error
-  """
-
-  thrift_spec = (
-    (0, TType.STRUCT, 'success', (JobData, JobData.thrift_spec), None, ), # 0
-    (1, TType.STRUCT, 'error', (SubmissionError, SubmissionError.thrift_spec), None, ), # 1
-  )
-
-  def __init__(self, success=None, error=None,):
-    self.success = success
-    self.error = error
-
-  def read(self, iprot):
-    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-      return
-    iprot.readStructBegin()
-    while True:
-      (fname, ftype, fid) = iprot.readFieldBegin()
-      if ftype == TType.STOP:
-        break
-      if fid == 0:
-        if ftype == TType.STRUCT:
-          self.success = JobData()
-          self.success.read(iprot)
-        else:
-          iprot.skip(ftype)
-      elif fid == 1:
-        if ftype == TType.STRUCT:
-          self.error = SubmissionError()
-          self.error.read(iprot)
-        else:
-          iprot.skip(ftype)
-      else:
-        iprot.skip(ftype)
-      iprot.readFieldEnd()
-    iprot.readStructEnd()
-
-  def write(self, oprot):
-    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-      return
-    oprot.writeStructBegin('get_job_data_result')
-    if self.success != None:
-      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-      self.success.write(oprot)
-      oprot.writeFieldEnd()
-    if self.error != None:
-      oprot.writeFieldBegin('error', TType.STRUCT, 1)
-      self.error.write(oprot)
-      oprot.writeFieldEnd()
-    oprot.writeFieldStop()
-    oprot.writeStructEnd()
-    def validate(self):
-      return
-
-
-  def __repr__(self):
-    L = ['%s=%r' % (key, value)
-      for key, value in self.__dict__.iteritems()]
-    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-  def __eq__(self, other):
-    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-  def __ne__(self, other):
-    return not (self == other)

+ 0 - 1
apps/jobsub/gen-py/jobsubd/__init__.py

@@ -1 +0,0 @@
-__all__ = ['ttypes', 'constants', 'JobSubmissionService']

+ 0 - 9
apps/jobsub/gen-py/jobsubd/constants.py

@@ -1,9 +0,0 @@
-#
-# Autogenerated by Thrift
-#
-# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-#
-
-from thrift.Thrift import *
-from ttypes import *
-

+ 0 - 725
apps/jobsub/gen-py/jobsubd/ttypes.py

@@ -1,725 +0,0 @@
-#
-# Autogenerated by Thrift
-#
-# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-#
-
-from thrift.Thrift import *
-
-from thrift.transport import TTransport
-from thrift.protocol import TBinaryProtocol, TProtocol
-try:
-  from thrift.protocol import fastbinary
-except:
-  fastbinary = None
-
-
-class State(object):
-  SUBMITTED = 1
-  RUNNING = 2
-  SUCCESS = 3
-  ERROR = 4
-  FAILURE = 5
-
-  _VALUES_TO_NAMES = {
-    1: "SUBMITTED",
-    2: "RUNNING",
-    3: "SUCCESS",
-    4: "ERROR",
-    5: "FAILURE",
-  }
-
-  _NAMES_TO_VALUES = {
-    "SUBMITTED": 1,
-    "RUNNING": 2,
-    "SUCCESS": 3,
-    "ERROR": 4,
-    "FAILURE": 5,
-  }
-
-class PreFabLocalizedFiles(object):
-  """
-  jar files that are included in the Hadoop distribution,
-  and therefore need not to be copied.
-  """
-  STREAMING = 1
-
-  _VALUES_TO_NAMES = {
-    1: "STREAMING",
-  }
-
-  _NAMES_TO_VALUES = {
-    "STREAMING": 1,
-  }
-
-
-class SubmissionHandle(object):
-  """
-  Attributes:
-   - id: Unique id for this instance of job submission.
-  In practice this is a primary key in the
-  database.  This struct exists so that the
-  handle can evolve (for example, to multiple
-  submission servers).
-  """
-
-  thrift_spec = (
-    None, # 0
-    (1, TType.I64, 'id', None, None, ), # 1
-  )
-
-  def __init__(self, id=None,):
-    self.id = id
-
-  def read(self, iprot):
-    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-      return
-    iprot.readStructBegin()
-    while True:
-      (fname, ftype, fid) = iprot.readFieldBegin()
-      if ftype == TType.STOP:
-        break
-      if fid == 1:
-        if ftype == TType.I64:
-          self.id = iprot.readI64();
-        else:
-          iprot.skip(ftype)
-      else:
-        iprot.skip(ftype)
-      iprot.readFieldEnd()
-    iprot.readStructEnd()
-
-  def write(self, oprot):
-    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-      return
-    oprot.writeStructBegin('SubmissionHandle')
-    if self.id != None:
-      oprot.writeFieldBegin('id', TType.I64, 1)
-      oprot.writeI64(self.id)
-      oprot.writeFieldEnd()
-    oprot.writeFieldStop()
-    oprot.writeStructEnd()
-    def validate(self):
-      return
-
-
-  def __repr__(self):
-    L = ['%s=%r' % (key, value)
-      for key, value in self.__dict__.iteritems()]
-    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-  def __eq__(self, other):
-    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-  def __ne__(self, other):
-    return not (self == other)
-
-class JobData(object):
-  """
-  Attributes:
-   - hadoop_job_ids: Job ID that the JobTracker has for this job
-   - stdout_tail: These are "tails" of the stdout/stderr from the Java process doing the
-  job submission.
-   - stderr_tail
-   - state
-  """
-
-  thrift_spec = (
-    None, # 0
-    (1, TType.LIST, 'hadoop_job_ids', (TType.STRING,None), None, ), # 1
-    (2, TType.STRING, 'stdout_tail', None, None, ), # 2
-    (3, TType.STRING, 'stderr_tail', None, None, ), # 3
-    (4, TType.I32, 'state', None, None, ), # 4
-  )
-
-  def __init__(self, hadoop_job_ids=None, stdout_tail=None, stderr_tail=None, state=None,):
-    self.hadoop_job_ids = hadoop_job_ids
-    self.stdout_tail = stdout_tail
-    self.stderr_tail = stderr_tail
-    self.state = state
-
-  def read(self, iprot):
-    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-      return
-    iprot.readStructBegin()
-    while True:
-      (fname, ftype, fid) = iprot.readFieldBegin()
-      if ftype == TType.STOP:
-        break
-      if fid == 1:
-        if ftype == TType.LIST:
-          self.hadoop_job_ids = []
-          (_etype3, _size0) = iprot.readListBegin()
-          for _i4 in xrange(_size0):
-            _elem5 = iprot.readString();
-            self.hadoop_job_ids.append(_elem5)
-          iprot.readListEnd()
-        else:
-          iprot.skip(ftype)
-      elif fid == 2:
-        if ftype == TType.STRING:
-          self.stdout_tail = iprot.readString();
-        else:
-          iprot.skip(ftype)
-      elif fid == 3:
-        if ftype == TType.STRING:
-          self.stderr_tail = iprot.readString();
-        else:
-          iprot.skip(ftype)
-      elif fid == 4:
-        if ftype == TType.I32:
-          self.state = iprot.readI32();
-        else:
-          iprot.skip(ftype)
-      else:
-        iprot.skip(ftype)
-      iprot.readFieldEnd()
-    iprot.readStructEnd()
-
-  def write(self, oprot):
-    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-      return
-    oprot.writeStructBegin('JobData')
-    if self.hadoop_job_ids != None:
-      oprot.writeFieldBegin('hadoop_job_ids', TType.LIST, 1)
-      oprot.writeListBegin(TType.STRING, len(self.hadoop_job_ids))
-      for iter6 in self.hadoop_job_ids:
-        oprot.writeString(iter6)
-      oprot.writeListEnd()
-      oprot.writeFieldEnd()
-    if self.stdout_tail != None:
-      oprot.writeFieldBegin('stdout_tail', TType.STRING, 2)
-      oprot.writeString(self.stdout_tail)
-      oprot.writeFieldEnd()
-    if self.stderr_tail != None:
-      oprot.writeFieldBegin('stderr_tail', TType.STRING, 3)
-      oprot.writeString(self.stderr_tail)
-      oprot.writeFieldEnd()
-    if self.state != None:
-      oprot.writeFieldBegin('state', TType.I32, 4)
-      oprot.writeI32(self.state)
-      oprot.writeFieldEnd()
-    oprot.writeFieldStop()
-    oprot.writeStructEnd()
-    def validate(self):
-      return
-
-
-  def __repr__(self):
-    L = ['%s=%r' % (key, value)
-      for key, value in self.__dict__.iteritems()]
-    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-  def __eq__(self, other):
-    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-  def __ne__(self, other):
-    return not (self == other)
-
-class SubmissionError(Exception):
-  """
-  Attributes:
-   - message
-   - detail
-  """
-
-  thrift_spec = (
-    None, # 0
-    (1, TType.STRING, 'message', None, None, ), # 1
-    (2, TType.STRING, 'detail', None, None, ), # 2
-  )
-
-  def __init__(self, message=None, detail=None,):
-    self.message = message
-    self.detail = detail
-
-  def read(self, iprot):
-    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-      return
-    iprot.readStructBegin()
-    while True:
-      (fname, ftype, fid) = iprot.readFieldBegin()
-      if ftype == TType.STOP:
-        break
-      if fid == 1:
-        if ftype == TType.STRING:
-          self.message = iprot.readString();
-        else:
-          iprot.skip(ftype)
-      elif fid == 2:
-        if ftype == TType.STRING:
-          self.detail = iprot.readString();
-        else:
-          iprot.skip(ftype)
-      else:
-        iprot.skip(ftype)
-      iprot.readFieldEnd()
-    iprot.readStructEnd()
-
-  def write(self, oprot):
-    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-      return
-    oprot.writeStructBegin('SubmissionError')
-    if self.message != None:
-      oprot.writeFieldBegin('message', TType.STRING, 1)
-      oprot.writeString(self.message)
-      oprot.writeFieldEnd()
-    if self.detail != None:
-      oprot.writeFieldBegin('detail', TType.STRING, 2)
-      oprot.writeString(self.detail)
-      oprot.writeFieldEnd()
-    oprot.writeFieldStop()
-    oprot.writeStructEnd()
-    def validate(self):
-      return
-
-
-  def __str__(self):
-    return repr(self)
-
-  def __repr__(self):
-    L = ['%s=%r' % (key, value)
-      for key, value in self.__dict__.iteritems()]
-    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-  def __eq__(self, other):
-    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-  def __ne__(self, other):
-    return not (self == other)
-
-class LocalizedFile(object):
-  """
-  File to be copied in a LocalizeFilesStep
-
-  Attributes:
-   - target_name: Name of file in current directory.
-  Framework has the right to make this a symlink.
-   - path_on_hdfs: Exactly one of the following may be set
-   - pre_fab_localized_file
-  """
-
-  thrift_spec = (
-    None, # 0
-    (1, TType.STRING, 'target_name', None, None, ), # 1
-    (2, TType.STRING, 'path_on_hdfs', None, None, ), # 2
-    (3, TType.I32, 'pre_fab_localized_file', None, None, ), # 3
-  )
-
-  def __init__(self, target_name=None, path_on_hdfs=None, pre_fab_localized_file=None,):
-    self.target_name = target_name
-    self.path_on_hdfs = path_on_hdfs
-    self.pre_fab_localized_file = pre_fab_localized_file
-
-  def read(self, iprot):
-    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-      return
-    iprot.readStructBegin()
-    while True:
-      (fname, ftype, fid) = iprot.readFieldBegin()
-      if ftype == TType.STOP:
-        break
-      if fid == 1:
-        if ftype == TType.STRING:
-          self.target_name = iprot.readString();
-        else:
-          iprot.skip(ftype)
-      elif fid == 2:
-        if ftype == TType.STRING:
-          self.path_on_hdfs = iprot.readString();
-        else:
-          iprot.skip(ftype)
-      elif fid == 3:
-        if ftype == TType.I32:
-          self.pre_fab_localized_file = iprot.readI32();
-        else:
-          iprot.skip(ftype)
-      else:
-        iprot.skip(ftype)
-      iprot.readFieldEnd()
-    iprot.readStructEnd()
-
-  def write(self, oprot):
-    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-      return
-    oprot.writeStructBegin('LocalizedFile')
-    if self.target_name != None:
-      oprot.writeFieldBegin('target_name', TType.STRING, 1)
-      oprot.writeString(self.target_name)
-      oprot.writeFieldEnd()
-    if self.path_on_hdfs != None:
-      oprot.writeFieldBegin('path_on_hdfs', TType.STRING, 2)
-      oprot.writeString(self.path_on_hdfs)
-      oprot.writeFieldEnd()
-    if self.pre_fab_localized_file != None:
-      oprot.writeFieldBegin('pre_fab_localized_file', TType.I32, 3)
-      oprot.writeI32(self.pre_fab_localized_file)
-      oprot.writeFieldEnd()
-    oprot.writeFieldStop()
-    oprot.writeStructEnd()
-    def validate(self):
-      return
-
-
-  def __repr__(self):
-    L = ['%s=%r' % (key, value)
-      for key, value in self.__dict__.iteritems()]
-    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-  def __eq__(self, other):
-    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-  def __ne__(self, other):
-    return not (self == other)
-
-class LocalizeFilesStep(object):
-  """
-  Places files into the working directory of "jobsub plan execution".
-
-  Attributes:
-   - localize_files
-  """
-
-  thrift_spec = (
-    None, # 0
-    (1, TType.LIST, 'localize_files', (TType.STRUCT,(LocalizedFile, LocalizedFile.thrift_spec)), None, ), # 1
-  )
-
-  def __init__(self, localize_files=None,):
-    self.localize_files = localize_files
-
-  def read(self, iprot):
-    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-      return
-    iprot.readStructBegin()
-    while True:
-      (fname, ftype, fid) = iprot.readFieldBegin()
-      if ftype == TType.STOP:
-        break
-      if fid == 1:
-        if ftype == TType.LIST:
-          self.localize_files = []
-          (_etype10, _size7) = iprot.readListBegin()
-          for _i11 in xrange(_size7):
-            _elem12 = LocalizedFile()
-            _elem12.read(iprot)
-            self.localize_files.append(_elem12)
-          iprot.readListEnd()
-        else:
-          iprot.skip(ftype)
-      else:
-        iprot.skip(ftype)
-      iprot.readFieldEnd()
-    iprot.readStructEnd()
-
-  def write(self, oprot):
-    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-      return
-    oprot.writeStructBegin('LocalizeFilesStep')
-    if self.localize_files != None:
-      oprot.writeFieldBegin('localize_files', TType.LIST, 1)
-      oprot.writeListBegin(TType.STRUCT, len(self.localize_files))
-      for iter13 in self.localize_files:
-        iter13.write(oprot)
-      oprot.writeListEnd()
-      oprot.writeFieldEnd()
-    oprot.writeFieldStop()
-    oprot.writeStructEnd()
-    def validate(self):
-      return
-
-
-  def __repr__(self):
-    L = ['%s=%r' % (key, value)
-      for key, value in self.__dict__.iteritems()]
-    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-  def __eq__(self, other):
-    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-  def __ne__(self, other):
-    return not (self == other)
-
-class BinHadoopStep(object):
-  """
-  Runs bin/hadoop, with enough environment to point at the
-  configured cluster, and to assume the correct user.
-
-  Attributes:
-   - arguments
-  """
-
-  thrift_spec = (
-    None, # 0
-    (1, TType.LIST, 'arguments', (TType.STRING,None), None, ), # 1
-  )
-
-  def __init__(self, arguments=None,):
-    self.arguments = arguments
-
-  def read(self, iprot):
-    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-      return
-    iprot.readStructBegin()
-    while True:
-      (fname, ftype, fid) = iprot.readFieldBegin()
-      if ftype == TType.STOP:
-        break
-      if fid == 1:
-        if ftype == TType.LIST:
-          self.arguments = []
-          (_etype17, _size14) = iprot.readListBegin()
-          for _i18 in xrange(_size14):
-            _elem19 = iprot.readString();
-            self.arguments.append(_elem19)
-          iprot.readListEnd()
-        else:
-          iprot.skip(ftype)
-      else:
-        iprot.skip(ftype)
-      iprot.readFieldEnd()
-    iprot.readStructEnd()
-
-  def write(self, oprot):
-    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-      return
-    oprot.writeStructBegin('BinHadoopStep')
-    if self.arguments != None:
-      oprot.writeFieldBegin('arguments', TType.LIST, 1)
-      oprot.writeListBegin(TType.STRING, len(self.arguments))
-      for iter20 in self.arguments:
-        oprot.writeString(iter20)
-      oprot.writeListEnd()
-      oprot.writeFieldEnd()
-    oprot.writeFieldStop()
-    oprot.writeStructEnd()
-    def validate(self):
-      return
-
-
-  def __repr__(self):
-    L = ['%s=%r' % (key, value)
-      for key, value in self.__dict__.iteritems()]
-    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-  def __eq__(self, other):
-    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-  def __ne__(self, other):
-    return not (self == other)
-
-class SubmissionPlanStep(object):
-  """
-  A union of all possible steps.
-
-  Note: THRIFT-409 (committed Sep 1 09) added support for unions
-  to Thrift.  After a thrift release, we could switch to that syntax.
-
-  Attributes:
-   - localize_files_step: Only one of these fields may be specified!
-   - bin_hadoop_step
-  """
-
-  thrift_spec = (
-    None, # 0
-    (1, TType.STRUCT, 'localize_files_step', (LocalizeFilesStep, LocalizeFilesStep.thrift_spec), None, ), # 1
-    (2, TType.STRUCT, 'bin_hadoop_step', (BinHadoopStep, BinHadoopStep.thrift_spec), None, ), # 2
-  )
-
-  def __init__(self, localize_files_step=None, bin_hadoop_step=None,):
-    self.localize_files_step = localize_files_step
-    self.bin_hadoop_step = bin_hadoop_step
-
-  def read(self, iprot):
-    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-      return
-    iprot.readStructBegin()
-    while True:
-      (fname, ftype, fid) = iprot.readFieldBegin()
-      if ftype == TType.STOP:
-        break
-      if fid == 1:
-        if ftype == TType.STRUCT:
-          self.localize_files_step = LocalizeFilesStep()
-          self.localize_files_step.read(iprot)
-        else:
-          iprot.skip(ftype)
-      elif fid == 2:
-        if ftype == TType.STRUCT:
-          self.bin_hadoop_step = BinHadoopStep()
-          self.bin_hadoop_step.read(iprot)
-        else:
-          iprot.skip(ftype)
-      else:
-        iprot.skip(ftype)
-      iprot.readFieldEnd()
-    iprot.readStructEnd()
-
-  def write(self, oprot):
-    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-      return
-    oprot.writeStructBegin('SubmissionPlanStep')
-    if self.localize_files_step != None:
-      oprot.writeFieldBegin('localize_files_step', TType.STRUCT, 1)
-      self.localize_files_step.write(oprot)
-      oprot.writeFieldEnd()
-    if self.bin_hadoop_step != None:
-      oprot.writeFieldBegin('bin_hadoop_step', TType.STRUCT, 2)
-      self.bin_hadoop_step.write(oprot)
-      oprot.writeFieldEnd()
-    oprot.writeFieldStop()
-    oprot.writeStructEnd()
-    def validate(self):
-      return
-
-
-  def __repr__(self):
-    L = ['%s=%r' % (key, value)
-      for key, value in self.__dict__.iteritems()]
-    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-  def __eq__(self, other):
-    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-  def __ne__(self, other):
-    return not (self == other)
-
-class SubmissionPlan(object):
-  """
-  Plan to be executed by jobsub.
-
-  Attributes:
-   - name
-   - user
-   - groups
-   - steps: Steps to execute, in order.
-   - save_output: Directory name in HDFS where stdout and stderr will be put
-  """
-
-  thrift_spec = (
-    None, # 0
-    (1, TType.STRING, 'name', None, None, ), # 1
-    (2, TType.STRING, 'user', None, None, ), # 2
-    (3, TType.LIST, 'groups', (TType.STRING,None), None, ), # 3
-    (4, TType.LIST, 'steps', (TType.STRUCT,(SubmissionPlanStep, SubmissionPlanStep.thrift_spec)), None, ), # 4
-    (5, TType.STRING, 'save_output', None, None, ), # 5
-  )
-
-  def __init__(self, name=None, user=None, groups=None, steps=None, save_output=None,):
-    self.name = name
-    self.user = user
-    self.groups = groups
-    self.steps = steps
-    self.save_output = save_output
-
-  def read(self, iprot):
-    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-      return
-    iprot.readStructBegin()
-    while True:
-      (fname, ftype, fid) = iprot.readFieldBegin()
-      if ftype == TType.STOP:
-        break
-      if fid == 1:
-        if ftype == TType.STRING:
-          self.name = iprot.readString();
-        else:
-          iprot.skip(ftype)
-      elif fid == 2:
-        if ftype == TType.STRING:
-          self.user = iprot.readString();
-        else:
-          iprot.skip(ftype)
-      elif fid == 3:
-        if ftype == TType.LIST:
-          self.groups = []
-          (_etype24, _size21) = iprot.readListBegin()
-          for _i25 in xrange(_size21):
-            _elem26 = iprot.readString();
-            self.groups.append(_elem26)
-          iprot.readListEnd()
-        else:
-          iprot.skip(ftype)
-      elif fid == 4:
-        if ftype == TType.LIST:
-          self.steps = []
-          (_etype30, _size27) = iprot.readListBegin()
-          for _i31 in xrange(_size27):
-            _elem32 = SubmissionPlanStep()
-            _elem32.read(iprot)
-            self.steps.append(_elem32)
-          iprot.readListEnd()
-        else:
-          iprot.skip(ftype)
-      elif fid == 5:
-        if ftype == TType.STRING:
-          self.save_output = iprot.readString();
-        else:
-          iprot.skip(ftype)
-      else:
-        iprot.skip(ftype)
-      iprot.readFieldEnd()
-    iprot.readStructEnd()
-
-  def write(self, oprot):
-    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-      return
-    oprot.writeStructBegin('SubmissionPlan')
-    if self.name != None:
-      oprot.writeFieldBegin('name', TType.STRING, 1)
-      oprot.writeString(self.name)
-      oprot.writeFieldEnd()
-    if self.user != None:
-      oprot.writeFieldBegin('user', TType.STRING, 2)
-      oprot.writeString(self.user)
-      oprot.writeFieldEnd()
-    if self.groups != None:
-      oprot.writeFieldBegin('groups', TType.LIST, 3)
-      oprot.writeListBegin(TType.STRING, len(self.groups))
-      for iter33 in self.groups:
-        oprot.writeString(iter33)
-      oprot.writeListEnd()
-      oprot.writeFieldEnd()
-    if self.steps != None:
-      oprot.writeFieldBegin('steps', TType.LIST, 4)
-      oprot.writeListBegin(TType.STRUCT, len(self.steps))
-      for iter34 in self.steps:
-        iter34.write(oprot)
-      oprot.writeListEnd()
-      oprot.writeFieldEnd()
-    if self.save_output != None:
-      oprot.writeFieldBegin('save_output', TType.STRING, 5)
-      oprot.writeString(self.save_output)
-      oprot.writeFieldEnd()
-    oprot.writeFieldStop()
-    oprot.writeStructEnd()
-    def validate(self):
-      return
-
-
-  def __repr__(self):
-    L = ['%s=%r' % (key, value)
-      for key, value in self.__dict__.iteritems()]
-    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
-  def __eq__(self, other):
-    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
-  def __ne__(self, other):
-    return not (self == other)

+ 1 - 1
apps/jobsub/src/jobsub/models.py

@@ -34,7 +34,7 @@ LOG = logging.getLogger(__name__)
 class JobDesign(models.Model):
 class JobDesign(models.Model):
   """
   """
   DEPRECATED!!!
   DEPRECATED!!!
-      This is the old Hue 1.x job design model. In Hue 2, the design is modelled
+      This is the old Hue 1.x job design model. In Hue 2, the design is modeled
       after Oozie workflows.
       after Oozie workflows.
 
 
   Contains CMS information for "job designs".
   Contains CMS information for "job designs".

+ 1 - 3
apps/jobsub/src/jobsub/settings.py

@@ -17,9 +17,7 @@ DJANGO_APPS=['jobsub']
 NICE_NAME = "Job Designer"
 NICE_NAME = "Job Designer"
 REQUIRES_HADOOP = True
 REQUIRES_HADOOP = True
 
 
-MIDDLEWARE_CLASSES=[
-  "jobsub.middleware.SubmissionErrorRecastMiddleware"
-]
+MIDDLEWARE_CLASSES=[]
 
 
 ICON = "/jobsub/static/art/icon_jobsub_24.png"
 ICON = "/jobsub/static/art/icon_jobsub_24.png"
 MENU_INDEX = 40
 MENU_INDEX = 40