From 3d5a3e06530c1250d48f7d838c619f3bfbcd019d Mon Sep 17 00:00:00 2001 From: Dileep Ranganathan Date: Thu, 30 May 2019 12:38:37 -0700 Subject: Refactor Distributed Analytics project structure Modified the project structure to improve maintainability and to add future CI and integration test support. Change-Id: Id30bfb1f83f23785a6b5f99e81f42f752d59c0f8 Issue-ID: ONAPARC-280 Signed-off-by: Dileep Ranganathan --- vnfs/DAaaS/GoApps/src/hdfs-writer/.gitignore | 40 --------------------------- vnfs/DAaaS/GoApps/src/hdfs-writer/Makefile | 35 ----------------------- vnfs/DAaaS/GoApps/src/hdfs-writer/README.md | 14 ---------- vnfs/DAaaS/GoApps/src/hdfs-writer/cmd/main.go | 25 ----------------- vnfs/DAaaS/GoApps/src/hdfs-writer/go.mod | 3 -- 5 files changed, 117 deletions(-) delete mode 100644 vnfs/DAaaS/GoApps/src/hdfs-writer/.gitignore delete mode 100644 vnfs/DAaaS/GoApps/src/hdfs-writer/Makefile delete mode 100644 vnfs/DAaaS/GoApps/src/hdfs-writer/README.md delete mode 100644 vnfs/DAaaS/GoApps/src/hdfs-writer/cmd/main.go delete mode 100644 vnfs/DAaaS/GoApps/src/hdfs-writer/go.mod (limited to 'vnfs/DAaaS/GoApps/src/hdfs-writer') diff --git a/vnfs/DAaaS/GoApps/src/hdfs-writer/.gitignore b/vnfs/DAaaS/GoApps/src/hdfs-writer/.gitignore deleted file mode 100644 index ad4781d2..00000000 --- a/vnfs/DAaaS/GoApps/src/hdfs-writer/.gitignore +++ /dev/null @@ -1,40 +0,0 @@ -# Common -.DS_Store -.vscode -*-workspace -.tox/ -.*.swp -*.log -coverage.html -docs/build -.Makefile.bk - -# Directories -pkg -bin -target -src/github.com -src/golang.org -src/k8splugin/vendor -src/k8splugin/.vendor-new/ -src/k8splugin/kubeconfig/* -deployments/k8plugin - -# Binaries -*.so -src/k8splugin/csar/mock_plugins/*.so -src/k8splugin/plugins/**/*.so - -# Tests -*.test -*.out - -# KRD -.vagrant/ -kud/hosting_providers/vagrant/inventory/hosts.ini -kud/hosting_providers/vagrant/inventory/artifacts -kud/hosting_providers/vagrant/inventory/group_vars/all.yml -kud/hosting_providers/vagrant/config/pdf.yml -kud/hosting_providers/vagrant/sources.list -*.retry -*.vdi \ No newline at end of file diff --git a/vnfs/DAaaS/GoApps/src/hdfs-writer/Makefile b/vnfs/DAaaS/GoApps/src/hdfs-writer/Makefile deleted file mode 100644 index e3f21405..00000000 --- a/vnfs/DAaaS/GoApps/src/hdfs-writer/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2019 Intel Corporation -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - - -GOPATH := $(shell realpath "$(PWD)/../../") -#export GOPATH=/Users/rajamoha/projects/demo/vnfs/DAaaS/GoApps -export GOPATH ... -export GO111MODULE=on - - - -all: - echo $$GOPATH - GOOS=linux GOARCH=amd64 - @go build -tags netgo -o ./bin/hdfs-writer ./cmd/main.go - -build: - echo $$GOPATH - GOOS=linux GOARCH=amd64 - @go build -tags netgo -o ./bin/hdfs-writer ./cmd/main.go - -.PHONY: format -format: - @go fmt ./... - -.PHONY: clean -clean: - @find . -name "*so" -delete - @rm -f ./bin/hdfs-writer diff --git a/vnfs/DAaaS/GoApps/src/hdfs-writer/README.md b/vnfs/DAaaS/GoApps/src/hdfs-writer/README.md deleted file mode 100644 index 453b842d..00000000 --- a/vnfs/DAaaS/GoApps/src/hdfs-writer/README.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# HDFS-writer - -Read a topic in kafka and write into HDFS directory. \ No newline at end of file diff --git a/vnfs/DAaaS/GoApps/src/hdfs-writer/cmd/main.go b/vnfs/DAaaS/GoApps/src/hdfs-writer/cmd/main.go deleted file mode 100644 index 11350f0b..00000000 --- a/vnfs/DAaaS/GoApps/src/hdfs-writer/cmd/main.go +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "os" - "fmt" - "log" - "github.com/colinmarc/hdfs/v2" -) - -func main() { - log.Println("Starting the HDFS writer") - localSourceFile := os.Args[1] - hdfsDestination := os.Args[2] - - log.Println("localSourceFile:: "+localSourceFile) - log.Println("hdfsDestination:: "+hdfsDestination) - - client, _ := hdfs.New("hdfs://hdfs-1-namenode-1.hdfs-1-namenode.hdfs1.svc.cluster.local:8020") - file, _ := client.Open("/kafka.txt") - - buf := make([]byte, 59) - file.ReadAt(buf, 48847) - fmt.Println(string(buf)) - -} diff --git a/vnfs/DAaaS/GoApps/src/hdfs-writer/go.mod b/vnfs/DAaaS/GoApps/src/hdfs-writer/go.mod deleted file mode 100644 index b2855127..00000000 --- a/vnfs/DAaaS/GoApps/src/hdfs-writer/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module hdfs-writer - -require github.com/colinmarc/hdfs/v2 v2.0.0 // indirect -- cgit 1.2.3-korg