<commit_before>"""Get a handle to the scheduler, working around prod/corp networking issues.
"""

__author__ = '<NAME>'

import os, sys
from twitter.common import log

# Load this first.  Because of general Python interpreter pyc path caching stupidity, you can't mix
# thrift versions, so whenever you import autogenerated thrift code and the scheduler_client module,
# the scheduler_client module must come first.
try:
  from thrift.protocol import TBinaryProtocol
  from thrift.transport import TSocket
  from thrift.transport import TTransport
  from thrift.transport import TSSLSocket
except ImportError, e:
  log.fatal("Local thrift imports failed: %s" % e)
  sys.exit(1)

import zookeeper

from endpoint.ttypes import *

from twitter.mesos import clusters
from gen.twitter.mesos import MesosAdmin
from gen.twitter.mesos.ttypes import *
from twitter.mesos.location import Location
from twitter.mesos.tunnel_helper import TunnelHelper
from twitter.mesos.zookeeper_helper import ZookeeperHelper

class SchedulerClient(object):
  def __init__(self, verbose=False, ssl=False):
    self._client = None
    self._verbose = verbose
    self._ssl = ssl

  def get_thrift_client(self):
    if self._client is None:<commit_msg>mesos client fix for new thrift endpoint namespace.<commit_after>"""Get a handle to the scheduler, working around prod/corp networking issues.
"""

__author__ = '<NAME>'

import os, sys
from twitter.common import log

# Load this first.  Because of general Python interpreter pyc path caching stupidity, you can't mix
# thrift versions, so whenever you import autogenerated thrift code and the scheduler_client module,
# the scheduler_client module must come first.
try:
  from thrift.protocol import TBinaryProtocol
  from thrift.transport import TSocket
  from thrift.transport import TTransport
  from thrift.transport import TSSLSocket
except ImportError, e:
  log.fatal("Local thrift imports failed: %s" % e)
  sys.exit(1)

import zookeeper

from gen.twitter.thrift.endpoint.ttypes import *

from twitter.mesos import clusters
from gen.twitter.mesos import MesosAdmin
from gen.twitter.mesos.ttypes import *
from twitter.mesos.location import Location
from twitter.mesos.tunnel_helper import TunnelHelper
from twitter.mesos.zookeeper_helper import ZookeeperHelper

class SchedulerClient(object):
  def __init__(self, verbose=False, ssl=False):
    self._client = None
    self._verbose = verbose
    self._ssl = ssl

  def get_thrift_client(self):
    if self._client is None:
{'fraction_non_alphanumeric': 0.06711945665201757, 'fraction_numerical': 0.0007990411506192569, 'mean_word_length': 4.90566037735849, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5441494', 'n_tokens_mistral': 740, 'n_tokens_neox': 712, 'n_words': 260}