diff options
author | Dileep Ranganathan <dileep.ranganathan@intel.com> | 2019-05-30 12:38:37 -0700 |
---|---|---|
committer | Dileep Ranganathan <dileep.ranganathan@intel.com> | 2019-05-30 21:11:52 +0000 |
commit | 3d5a3e06530c1250d48f7d838c619f3bfbcd019d (patch) | |
tree | 349e370c43ce7318b3f7eb7736345de6872cbef2 /vnfs/DAaaS/GoApps/src | |
parent | 31802660dfe74a8671ae29789f0018f0f887ea1a (diff) |
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 <dileep.ranganathan@intel.com>
Diffstat (limited to 'vnfs/DAaaS/GoApps/src')
-rw-r--r-- | vnfs/DAaaS/GoApps/src/hdfs-writer/.gitignore | 40 | ||||
-rw-r--r-- | vnfs/DAaaS/GoApps/src/hdfs-writer/Makefile | 35 | ||||
-rw-r--r-- | vnfs/DAaaS/GoApps/src/hdfs-writer/README.md | 14 | ||||
-rw-r--r-- | vnfs/DAaaS/GoApps/src/hdfs-writer/cmd/main.go | 25 | ||||
-rw-r--r-- | vnfs/DAaaS/GoApps/src/hdfs-writer/go.mod | 3 |
5 files changed, 0 insertions, 117 deletions
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 @@ -<!-- Copyright 2019 Intel Corporation. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. --> - -# 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 |