Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:wonlay/sin

  • Loading branch information...
commit d5536ebdcb9b7f6720101a697c7af3ec54463194 2 parents 2cd1ea0 + 10f2066
rbelkin authored
6 client/python/setup.py
View
@@ -7,9 +7,9 @@
version='0.1-SNAPSHOT',
description='This library implements a Sin client',
url='https://github.com/wonlay/sin',
- packages=['sinClient'],
- package_dir={'sinClient': 'src/sinClient'},
- package_data={'sinClient': ['data/test.json']},
+ packages=['sin'],
+ package_dir={'sin': 'src/sin'},
+ package_data={'sin': ['data/test.json']},
classifiers=[
"Development Status :: 3 - Alpha",
"Topic :: Service",
0  client/python/src/sinClient/__init__.py → client/python/src/sin/__init__.py
View
File renamed without changes
0  client/python/src/sinClient/data/test.json → client/python/src/sin/data/test.json
View
File renamed without changes
0  client/python/src/sinClient/kafka.py → client/python/src/sin/kafka.py
View
File renamed without changes
0  client/python/src/sinClient/senseiClient.py → client/python/src/sin/senseiClient.py
View
File renamed without changes
0  client/python/src/sinClient/sinClient.py → client/python/src/sin/sinClient.py
View
File renamed without changes
72 shell/sin_shell.py
View
@@ -0,0 +1,72 @@
+#!/usr/bin/env python
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+"""Sin Shell
+"""
+import sys
+import datetime
+import logging
+
+from sin.sinClient import SinClient
+
+logger = logging.getLogger("sin_client")
+
+
+def main(argv):
+ print "Welcome to Sin Shell"
+ from optparse import OptionParser
+ usage = "usage: %prog [options]"
+ parser = OptionParser(usage=usage)
+ parser.add_option("-w", "--column-width", dest="max_col_width",default=100, help="Set the max column width")
+ parser.add_option("-v", "--verbose", action="store_true", dest="verbose",default=False, help="Turn on verbose mode")
+ (options, args) = parser.parse_args()
+
+ if options.verbose:
+ logger.setLevel(logging.DEBUG)
+ else:
+ logger.setLevel(logging.INFO)
+
+ formatter = logging.Formatter("%(asctime)s %(filename)s:%(lineno)d - %(message)s")
+ stream_handler = logging.StreamHandler()
+ stream_handler.setFormatter(formatter)
+ logger.addHandler(stream_handler)
+
+ host = 'localhost'
+ port = 8666
+ if len(args) > 1:
+ host = args[0]
+ port = int(args[1])
+ logger.debug("Url specified, host: %s, port: %d" % (host,port))
+ print "Url specified, host: %s, port: %d" % (host,port)
+ #client = SenseiClient(host, port, 'sensei')
+
+
+ print "using host=%s, port=%d" %(host,port)
+ import readline
+ readline.parse_and_bind("tab: complete")
+
+ sinClient = SinClient(host,port)
+
+ while 1:
+ try:
+ stmt = raw_input('> ')
+ if stmt == "exit":
+ break
+ else:
+ pass
+ except EOFError:
+ break
+
+
+if __name__ == "__main__":
+ main(sys.argv)
1  start_script/mac/kafka-clean-log.sh
View
@@ -0,0 +1 @@
+rm -rf /tmp/kafka-log/*
2  start_script/mac/kafka-start.sh
View
@@ -0,0 +1,2 @@
+$KAFKA_HOME/bin/kafka-server-start.sh $KAFKA_HOME/config/server.properties
+
1  start_script/mac/kafka-stop.sh
View
@@ -0,0 +1 @@
+$KAFKA_HOME/bin/kafka-server-stop.sh
2  start_script/mac/sin_agent.sh
View
@@ -0,0 +1,2 @@
+cd $SIN_HOME/app
+python -i agent/sin_agent.py
2  start_script/mac/sin_server.sh
View
@@ -0,0 +1,2 @@
+cd $SIN_HOME/app
+python manage.py runserver 0.0.0.0:8000
1  start_script/mac/zk-start.sh
View
@@ -0,0 +1 @@
+$ZK_HOME/bin/zkServer.sh start
1  start_script/mac/zk-stop.sh
View
@@ -0,0 +1 @@
+$ZK_HOME/bin/zkServer.sh stop
Please sign in to comment.
Something went wrong with that request. Please try again.