# -*- coding: utf-8 -*-
#http://www.cnblogs.com/letong/p/4749234.html
#http://elasticsearch-py.readthedocs.io/en/master/api.html#elasticsearch
#http://blog.youkuaiyun.com/xiaoxinwenziyao/article/details/49471977
#https://github.com/Parsely/pykafka
from datetime import datetime
from elasticsearch import Elasticsearch
from elasticsearch.helpers import bulk
#使用kafka 走正式流程操作
from pykafka import KafkaClient
topicName = ""
kafkaHosts = ""
client = KafkaClient(hosts=kafkaHosts)
topic = client.topics[topicName]
producer = topic.get_producer()
es = Elasticsearch([{"host":"","port":9200,"timeout":15000}])
es_Test = Elasticsearch([{"host":"","port":9200}])
#{"method":"save","data":[{},{}]}
# def sav