From e19067379fbfce13cc153de96c18718ba115889c Mon Sep 17 00:00:00 2001 From: Rajamohan Raj Date: Tue, 21 May 2019 18:39:52 -0700 Subject: HDFS-writer skelton code This contains the skelton code for developing the hdfs-writer further. Issue-ID: ONAPARC-391 Signed-off-by: Rajamohan Raj Change-Id: I261c4a2bf12498bdba8a4720c3200ff9289a2328 --- vnfs/DAaaS/GoApps/src/hdfs-writer/.gitignore | 40 +++++++++++++++++++++++++++ vnfs/DAaaS/GoApps/src/hdfs-writer/Makefile | 29 +++++++++++++++++++ vnfs/DAaaS/GoApps/src/hdfs-writer/README.md | 14 ++++++++++ vnfs/DAaaS/GoApps/src/hdfs-writer/cmd/main.go | 11 ++++++++ vnfs/DAaaS/GoApps/src/hdfs-writer/go.mod | 1 + 5 files changed, 95 insertions(+) create mode 100644 vnfs/DAaaS/GoApps/src/hdfs-writer/.gitignore create mode 100644 vnfs/DAaaS/GoApps/src/hdfs-writer/Makefile create mode 100644 vnfs/DAaaS/GoApps/src/hdfs-writer/README.md create mode 100644 vnfs/DAaaS/GoApps/src/hdfs-writer/cmd/main.go create mode 100644 vnfs/DAaaS/GoApps/src/hdfs-writer/go.mod (limited to 'vnfs/DAaaS/GoApps') diff --git a/vnfs/DAaaS/GoApps/src/hdfs-writer/.gitignore b/vnfs/DAaaS/GoApps/src/hdfs-writer/.gitignore new file mode 100644 index 00000000..ad4781d2 --- /dev/null +++ b/vnfs/DAaaS/GoApps/src/hdfs-writer/.gitignore @@ -0,0 +1,40 @@ +# 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 new file mode 100644 index 00000000..d31fd66b --- /dev/null +++ b/vnfs/DAaaS/GoApps/src/hdfs-writer/Makefile @@ -0,0 +1,29 @@ +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 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 ... +export GO111MODULE=on + + + +all: + echo $$GOPATH + @go build -tags netgo -o ./bin/hdfs-writer ./cmd/main.go + +build: + echo $$GOPATH + @go build -tags netgo -o ./bin/hdfs-writer ./cmd/main.go + + +.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 new file mode 100644 index 00000000..b0475758 --- /dev/null +++ b/vnfs/DAaaS/GoApps/src/hdfs-writer/README.md @@ -0,0 +1,14 @@ + + +# 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 new file mode 100644 index 00000000..abc75fb7 --- /dev/null +++ b/vnfs/DAaaS/GoApps/src/hdfs-writer/cmd/main.go @@ -0,0 +1,11 @@ +package main + +import ( + "fmt" + "log" +) + +func main() { + log.Println("Starting the HDFS writer") + fmt.Println("Starting the HDFS writer ...") +} diff --git a/vnfs/DAaaS/GoApps/src/hdfs-writer/go.mod b/vnfs/DAaaS/GoApps/src/hdfs-writer/go.mod new file mode 100644 index 00000000..cf8a1d81 --- /dev/null +++ b/vnfs/DAaaS/GoApps/src/hdfs-writer/go.mod @@ -0,0 +1 @@ +module /Users/rajamoha/projects/demo/vnfs/DAaaS/GoApps/src/hdfs-writer -- cgit 1.2.3-korg