blob: 743902084e6d48f9382719ee80afa822e9852fe5 [file] [log] [blame]
import itertools
import string
import json
from datetime import datetime
from elasticsearch import Elasticsearch
import elasticsearch
import elasticsearch.helpers
from elasticsearch.client import IndicesClient
import sys, os
def readFileToJson(fileName):
print "read file ", fileName
fo=open(fileName)
try:
json_mapping=json.load(fo)
fo.close()
except ValueError:
print "error in reading file " , fileName
fo.close()
raise
return json_mapping