HDFS-writer skelton code 09/88209/1
authorRajamohan Raj <rajamohan.raj@intel.com>
Wed, 22 May 2019 01:39:52 +0000 (18:39 -0700)
committerRajamohan Raj <rajamohan.raj@intel.com>
Wed, 22 May 2019 01:42:25 +0000 (18:42 -0700)
This contains the skelton code for developing the hdfs-writer further.

Issue-ID: ONAPARC-391
Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com>
Change-Id: I261c4a2bf12498bdba8a4720c3200ff9289a2328

vnfs/DAaaS/GoApps/src/hdfs-writer/.gitignore [new file with mode: 0644]
vnfs/DAaaS/GoApps/src/hdfs-writer/Makefile [new file with mode: 0644]
vnfs/DAaaS/GoApps/src/hdfs-writer/README.md [new file with mode: 0644]
vnfs/DAaaS/GoApps/src/hdfs-writer/cmd/main.go [new file with mode: 0644]
vnfs/DAaaS/GoApps/src/hdfs-writer/go.mod [new file with mode: 0644]

diff --git a/vnfs/DAaaS/GoApps/src/hdfs-writer/.gitignore b/vnfs/DAaaS/GoApps/src/hdfs-writer/.gitignore
new file mode 100644 (file)
index 0000000..ad4781d
--- /dev/null
@@ -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 (file)
index 0000000..d31fd66
--- /dev/null
@@ -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 (file)
index 0000000..b047575
--- /dev/null
@@ -0,0 +1,14 @@
+<!-- Copyright 2018 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
new file mode 100644 (file)
index 0000000..abc75fb
--- /dev/null
@@ -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 (file)
index 0000000..cf8a1d8
--- /dev/null
@@ -0,0 +1 @@
+module /Users/rajamoha/projects/demo/vnfs/DAaaS/GoApps/src/hdfs-writer