Commit 5ad2e8a8 authored by M.S.M.Perera's avatar M.S.M.Perera

Implemented single upload function

parent 50e97afd
...@@ -433,6 +433,15 @@ def readSingleHadoopData(gazetteno): ...@@ -433,6 +433,15 @@ def readSingleHadoopData(gazetteno):
print() print()
def SingleUpload(jsObj, name):
client = InsecureClient('http://localhost:9870',
user='Shalini')
outputFileName = '/home/user_e/egaz/' + name + '.json'
client.write(outputFileName, data=dumps(jsObj), overwrite=True)
# data_ = readHadoopDataVacancy() # data_ = readHadoopDataVacancy()
# data_ = TopicCluster.clustervac(data_) # data_ = TopicCluster.clustervac(data_)
# for item in data_: # for item in data_:
...@@ -478,16 +487,6 @@ def readHadoopDataVacancy(): ...@@ -478,16 +487,6 @@ def readHadoopDataVacancy():
return data_ return data_
def SingleUpload(jsObj, name):
client = InsecureClient('http://localhost:9870',
user='Shalini')
outputFileName = '/home/user_e/egaz/' + name + '.json'
client.write(outputFileName, data=dumps(jsObj), overwrite=True)
def readSecondaryStorage(): def readSecondaryStorage():
data_ = [] data_ = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment