You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by wh...@apache.org on 2016/01/05 20:52:46 UTC
[46/50] [abbrv] hadoop git commit: [partial-ns] Import snappy in
hdfsdb.
[partial-ns] Import snappy in hdfsdb.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/cb5ba73b
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/cb5ba73b
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/cb5ba73b
Branch: refs/heads/feature-HDFS-8286
Commit: cb5ba73bf65b137f21304e7d109352636733762a
Parents: 6f99a9d
Author: Haohui Mai <wh...@apache.org>
Authored: Fri Sep 19 10:44:30 2014 -0700
Committer: Haohui Mai <wh...@apache.org>
Committed: Fri Jun 12 13:57:00 2015 -0700
----------------------------------------------------------------------
.../src/main/native/hdfsdb/CMakeLists.txt | 26 +-
.../src/main/native/snappy/AUTHORS | 1 +
.../src/main/native/snappy/COPYING | 54 +
.../src/main/native/snappy/ChangeLog | 1916 +++
.../src/main/native/snappy/Makefile.am | 23 +
.../hadoop-hdfsdb/src/main/native/snappy/NEWS | 128 +
.../hadoop-hdfsdb/src/main/native/snappy/README | 135 +
.../src/main/native/snappy/autogen.sh | 7 +
.../src/main/native/snappy/configure.ac | 133 +
.../main/native/snappy/format_description.txt | 110 +
.../src/main/native/snappy/framing_format.txt | 135 +
.../src/main/native/snappy/m4/gtest.m4 | 74 +
.../src/main/native/snappy/snappy-c.cc | 90 +
.../src/main/native/snappy/snappy-c.h | 138 +
.../src/main/native/snappy/snappy-internal.h | 150 +
.../src/main/native/snappy/snappy-sinksource.cc | 71 +
.../src/main/native/snappy/snappy-sinksource.h | 137 +
.../main/native/snappy/snappy-stubs-internal.cc | 42 +
.../main/native/snappy/snappy-stubs-internal.h | 491 +
.../main/native/snappy/snappy-stubs-public.h | 82 +
.../main/native/snappy/snappy-stubs-public.h.in | 98 +
.../src/main/native/snappy/snappy-test.cc | 606 +
.../src/main/native/snappy/snappy-test.h | 582 +
.../src/main/native/snappy/snappy.cc | 1306 ++
.../src/main/native/snappy/snappy.h | 184 +
.../src/main/native/snappy/snappy_unittest.cc | 1355 +++
.../src/main/native/snappy/testdata/alice29.txt | 3609 ++++++
.../main/native/snappy/testdata/asyoulik.txt | 4122 +++++++
.../main/native/snappy/testdata/baddata1.snappy | Bin 0 -> 27512 bytes
.../main/native/snappy/testdata/baddata2.snappy | Bin 0 -> 27483 bytes
.../main/native/snappy/testdata/baddata3.snappy | Bin 0 -> 28384 bytes
.../main/native/snappy/testdata/fireworks.jpeg | Bin 0 -> 123093 bytes
.../main/native/snappy/testdata/geo.protodata | Bin 0 -> 118588 bytes
.../src/main/native/snappy/testdata/html | 1 +
.../src/main/native/snappy/testdata/html_x_4 | 1 +
.../src/main/native/snappy/testdata/kppkn.gtb | Bin 0 -> 184320 bytes
.../src/main/native/snappy/testdata/lcet10.txt | 7519 ++++++++++++
.../main/native/snappy/testdata/paper-100k.pdf | 598 +
.../main/native/snappy/testdata/plrabn12.txt | 10699 +++++++++++++++++
.../src/main/native/snappy/testdata/urls.10K | 10000 +++++++++++++++
40 files changed, 44620 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/cb5ba73b/hadoop-hdfs-project/hadoop-hdfsdb/src/main/native/hdfsdb/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfsdb/src/main/native/hdfsdb/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfsdb/src/main/native/hdfsdb/CMakeLists.txt
index eb2b5b2..a0fc53f 100644
--- a/hadoop-hdfs-project/hadoop-hdfsdb/src/main/native/hdfsdb/CMakeLists.txt
+++ b/hadoop-hdfs-project/hadoop-hdfsdb/src/main/native/hdfsdb/CMakeLists.txt
@@ -1,7 +1,9 @@
cmake_minimum_required(VERSION 2.8)
-PROJECT(hdfsdb)
+project(hdfsdb)
-ENABLE_TESTING()
+include(CheckIncludeFiles)
+
+enable_testing()
set(VERSION_MAJOR 1)
set(VERSION_MINOR 15)
@@ -23,12 +25,30 @@ set(HDFSDBSRCS db/builder.cc db/db_impl.cc db/db_iter.cc db/dbformat.cc
util/logging.cc util/options.cc util/status.cc
)
+add_definitions(-DSNAPPY)
+include_directories(../snappy)
+set(SNAPPY_SRCS ../snappy/snappy.cc ../snappy/snappy-sinksource.cc ../snappy/snappy-stubs-internal.cc)
+
+check_include_files("sys/uio.h" HAVE_SYS_UIO_H)
+if (HAVE_SET_UIO_H)
+add_definition(-DHAVE_SYS_UIO_H)
+endif()
+
+if(APPLE)
+add_definitions(-DOS_MACOSX -DLEVELDB_PLATFORM_POSIX)
+set(PORT_SRCS port/port_posix.cc util/env_posix.cc)
+elseif("${CMAKE_SYSTEM}" MATCHES "Linux")
+add_definitions(-DOS_LINUX -DLEVELDB_PLATFORM_POSIX)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-builtin-memcmp -pthread -fPIC")
+set(PORT_SRCS port/port_posix.cc util/env_posix.cc)
+endif()
+
if(APPLE)
add_definitions(-DOS_MACOSX -DLEVELDB_PLATFORM_POSIX)
set(PORT_SRCS port/port_posix.cc util/env_posix.cc)
endif()
-add_library(hdfsdb STATIC ${HDFSDBSRCS} ${PORT_SRCS})
+add_library(hdfsdb STATIC ${HDFSDBSRCS} ${PORT_SRCS} ${SNAPPY_SRCS})
set(TESTHARNESS_SRCS util/testutil.cc util/testharness.cc)
add_library(hdfsdb-test-harness ${TESTHARNESS_SRCS})
http://git-wip-us.apache.org/repos/asf/hadoop/blob/cb5ba73b/hadoop-hdfs-project/hadoop-hdfsdb/src/main/native/snappy/AUTHORS
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfsdb/src/main/native/snappy/AUTHORS b/hadoop-hdfs-project/hadoop-hdfsdb/src/main/native/snappy/AUTHORS
new file mode 100644
index 0000000..4858b37
--- /dev/null
+++ b/hadoop-hdfs-project/hadoop-hdfsdb/src/main/native/snappy/AUTHORS
@@ -0,0 +1 @@
+opensource@google.com
http://git-wip-us.apache.org/repos/asf/hadoop/blob/cb5ba73b/hadoop-hdfs-project/hadoop-hdfsdb/src/main/native/snappy/COPYING
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfsdb/src/main/native/snappy/COPYING b/hadoop-hdfs-project/hadoop-hdfsdb/src/main/native/snappy/COPYING
new file mode 100644
index 0000000..4816c43
--- /dev/null
+++ b/hadoop-hdfs-project/hadoop-hdfsdb/src/main/native/snappy/COPYING
@@ -0,0 +1,54 @@
+Copyright 2011, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+===
+
+Some of the benchmark data in util/zippy/testdata is licensed differently:
+
+ - fireworks.jpeg is Copyright 2013 Steinar H. Gunderson, and
+ is licensed under the Creative Commons Attribution 3.0 license
+ (CC-BY-3.0). See https://creativecommons.org/licenses/by/3.0/
+ for more information.
+
+ - kppkn.gtb is taken from the Gaviota chess tablebase set, and
+ is licensed under the MIT License. See
+ https://sites.google.com/site/gaviotachessengine/Home/endgame-tablebases-1
+ for more information.
+
+ - paper-100k.pdf is an excerpt (bytes 92160 to 194560) from the paper
+ “Combinatorial Modeling of Chromatin Features Quantitatively Predicts DNA
+ Replication Timing in _Drosophila_” by Federico Comoglio and Renato Paro,
+ which is licensed under the CC-BY license. See
+ http://www.ploscompbiol.org/static/license for more ifnormation.
+
+ - alice29.txt, asyoulik.txt, plrabn12.txt and lcet10.txt are from Project
+ Gutenberg. The first three have expired copyrights and are in the public
+ domain; the latter does not have expired copyright, but is still in the
+ public domain according to the license information
+ (http://www.gutenberg.org/ebooks/53).