diff options
author | 2019-10-31 23:51:29 +0000 | |
---|---|---|
committer | 2019-11-04 14:02:09 +0000 | |
commit | 68d118176bb53c36b31a7060cfa16ad5acac1765 (patch) | |
tree | c6dfd74445126f24e8d63457e33720fc5e0d38bb /vnfs/DAaaS/microservices/GoApps/src/go-hdfs-writer/pkg/utils/hdfsUtils.go | |
parent | 68042495ef1e1e6dff7fed7fc2691b01cf672fe1 (diff) |
HDFS-WriterApp-Fixed all the code review comments
Fixed all the code review comments by Kiran
1. Implemented a boolean channel instead of empty struct channel for signal, use WaitGroup
to ensure all writers finish cleanup.
2. Introduce JSON tags for configs
4. remove all panic and fatalf code to ensure that the app doesnt crash anytime.
5. remove unneccessary hdfsWriter null checks.
6.remove the 'run' variable used in the infinite loop, replaced with 'return'
Issue-ID: ONAPARC-453
Change-Id: Ic77c59dc75a8898a3cf34999850e6687d40e7faa
Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com>
Diffstat (limited to 'vnfs/DAaaS/microservices/GoApps/src/go-hdfs-writer/pkg/utils/hdfsUtils.go')
-rw-r--r-- | vnfs/DAaaS/microservices/GoApps/src/go-hdfs-writer/pkg/utils/hdfsUtils.go | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/vnfs/DAaaS/microservices/GoApps/src/go-hdfs-writer/pkg/utils/hdfsUtils.go b/vnfs/DAaaS/microservices/GoApps/src/go-hdfs-writer/pkg/utils/hdfsUtils.go index 1a93a5ad..8edcec19 100644 --- a/vnfs/DAaaS/microservices/GoApps/src/go-hdfs-writer/pkg/utils/hdfsUtils.go +++ b/vnfs/DAaaS/microservices/GoApps/src/go-hdfs-writer/pkg/utils/hdfsUtils.go @@ -3,24 +3,9 @@ package utils import ( "fmt" "github.com/colinmarc/hdfs" - //"sync" - //"go.uber.org/zap" ) -//var clientOnce sync.Once -//var hdfsClient *hdfs.Client -//var slogger *zap.SugaredLogger - - -//GetHdfsClientInstance returns a singleton hdfsClient instance -// func GetHdfsClientInstance(hdfsURL string) (*hdfs.Client){ -// clientOnce.Do(func(){ -// hdfsClient = createHdfsClient(hdfsURL) -// }) -// return hdfsClient -// } - //CreateHdfsClient creates a hdfs client and returns hdfs client func CreateHdfsClient(hdfsURL string) (*hdfs.Client){ slogger := GetLoggerInstance() |