Repository: kudu Updated Branches: refs/heads/master ba955733d -> fff4185e0
[examples] Add licenses to Python examples This also adds a README to the graphite example warning that it's not a real integration, just an example. Change-Id: I8825bfac0416fc19fdb99c972eb104898ba78e7d Reviewed-on: http://gerrit.cloudera.org:8080/9858 Tested-by: Kudu Jenkins Reviewed-by: Adar Dembo <a...@cloudera.com> Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/357ef6c9 Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/357ef6c9 Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/357ef6c9 Branch: refs/heads/master Commit: 357ef6c9f736a77ae1cec786088adff4d8ac5091 Parents: ba95573 Author: Will Berkeley <wdberke...@apache.org> Authored: Thu Mar 29 14:34:26 2018 -0700 Committer: Will Berkeley <wdberke...@gmail.com> Committed: Mon Apr 2 04:26:44 2018 +0000 ---------------------------------------------------------------------- examples/python/dstat-kudu/README.md | 14 ++++++++++++ examples/python/dstat-kudu/kudu_dstat.py | 17 ++++++++++++++ examples/python/graphite-kudu/README.adoc | 24 ++++++++++++++++++++ examples/python/graphite-kudu/kudu/__init__.py | 17 ++++++++++++++ .../python/graphite-kudu/kudu/kudu_graphite.py | 19 +++++++++++++++- examples/python/graphite-kudu/setup.py | 18 ++++++++++++++- python/setup.cfg | 2 +- 7 files changed, 108 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/357ef6c9/examples/python/dstat-kudu/README.md ---------------------------------------------------------------------- diff --git a/examples/python/dstat-kudu/README.md b/examples/python/dstat-kudu/README.md index a4f443c..f2ba031 100644 --- a/examples/python/dstat-kudu/README.md +++ b/examples/python/dstat-kudu/README.md @@ -1,3 +1,17 @@ +<!--- +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. +--> + # Kudu + dstat + Impala This is an example program that shows how to use the Kudu API in Python to load data into http://git-wip-us.apache.org/repos/asf/kudu/blob/357ef6c9/examples/python/dstat-kudu/kudu_dstat.py ---------------------------------------------------------------------- diff --git a/examples/python/dstat-kudu/kudu_dstat.py b/examples/python/dstat-kudu/kudu_dstat.py index f1f5bb2..4bc3485 100644 --- a/examples/python/dstat-kudu/kudu_dstat.py +++ b/examples/python/dstat-kudu/kudu_dstat.py @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. + import kudu import os import subprocess http://git-wip-us.apache.org/repos/asf/kudu/blob/357ef6c9/examples/python/graphite-kudu/README.adoc ---------------------------------------------------------------------- diff --git a/examples/python/graphite-kudu/README.adoc b/examples/python/graphite-kudu/README.adoc new file mode 100644 index 0000000..eede0d4 --- /dev/null +++ b/examples/python/graphite-kudu/README.adoc @@ -0,0 +1,24 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you 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. + += Kudu Python client Graphite example +:author: Kudu Team +:homepage: https://kudu.apache.org/ + +This uses the Python client to implement a plugin for using graphite-web with +Kudu as a backend. Be aware it's meant just as an example of how to use the +Python client. It is not a well-tested integration. http://git-wip-us.apache.org/repos/asf/kudu/blob/357ef6c9/examples/python/graphite-kudu/kudu/__init__.py ---------------------------------------------------------------------- diff --git a/examples/python/graphite-kudu/kudu/__init__.py b/examples/python/graphite-kudu/kudu/__init__.py index 34da70a..c53d0d3 100644 --- a/examples/python/graphite-kudu/kudu/__init__.py +++ b/examples/python/graphite-kudu/kudu/__init__.py @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. + from pkgutil import extend_path __path__ = extend_path(__path__, __name__) http://git-wip-us.apache.org/repos/asf/kudu/blob/357ef6c9/examples/python/graphite-kudu/kudu/kudu_graphite.py ---------------------------------------------------------------------- diff --git a/examples/python/graphite-kudu/kudu/kudu_graphite.py b/examples/python/graphite-kudu/kudu/kudu_graphite.py index 86a142e..1765303 100644 --- a/examples/python/graphite-kudu/kudu/kudu_graphite.py +++ b/examples/python/graphite-kudu/kudu/kudu_graphite.py @@ -1,5 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. + import sys, os - + import re import time import math http://git-wip-us.apache.org/repos/asf/kudu/blob/357ef6c9/examples/python/graphite-kudu/setup.py ---------------------------------------------------------------------- diff --git a/examples/python/graphite-kudu/setup.py b/examples/python/graphite-kudu/setup.py index 386edeb..e02ac96 100644 --- a/examples/python/graphite-kudu/setup.py +++ b/examples/python/graphite-kudu/setup.py @@ -1,4 +1,20 @@ -# coding: utf-8 +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. + from setuptools import setup setup( http://git-wip-us.apache.org/repos/asf/kudu/blob/357ef6c9/python/setup.cfg ---------------------------------------------------------------------- diff --git a/python/setup.cfg b/python/setup.cfg index 9af7e6f..b7e4789 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -1,2 +1,2 @@ [aliases] -test=pytest \ No newline at end of file +test=pytest