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:15 UTC

[15/50] [abbrv] hadoop git commit: [partial-ns] Mavenize the build of HDFSDB.

[partial-ns] Mavenize the build of HDFSDB.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/6f99a9d1
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/6f99a9d1
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/6f99a9d1

Branch: refs/heads/feature-HDFS-8286
Commit: 6f99a9d1eb18f94c5af5351e7985466ebe9485da
Parents: 4a6419f
Author: Haohui Mai <wh...@apache.org>
Authored: Thu Sep 18 15:56:05 2014 -0700
Committer: Haohui Mai <wh...@apache.org>
Committed: Fri Jun 12 13:56:59 2015 -0700

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfsdb/pom.xml       | 68 ++++++++++++++++++++
 .../src/main/native/CMakeLists.txt              | 11 ++++
 .../src/main/native/hdfsdb/CMakeLists.txt       | 64 ++++++++++++++++++
 hadoop-hdfs-project/pom.xml                     |  1 +
 4 files changed, 144 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/6f99a9d1/hadoop-hdfs-project/hadoop-hdfsdb/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfsdb/pom.xml b/hadoop-hdfs-project/hadoop-hdfsdb/pom.xml
new file mode 100644
index 0000000..1eef71e
--- /dev/null
+++ b/hadoop-hdfs-project/hadoop-hdfsdb/pom.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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. See accompanying LICENSE file.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.hadoop</groupId>
+    <artifactId>hadoop-project-dist</artifactId>
+    <version>3.0.0-SNAPSHOT</version>
+    <relativePath>../../hadoop-project-dist</relativePath>
+  </parent>
+  <groupId>org.apache.hadoop</groupId>
+  <artifactId>hadoop-hdfsdb</artifactId>
+  <version>3.0.0-SNAPSHOT</version>
+  <name>Apache Hadoop HDFSDB</name>
+  <description>Apache Hadoop HDFSDB</description>
+  <packaging>jar</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>make</id>
+            <phase>compile</phase>
+            <goals><goal>run</goal></goals>
+            <configuration>
+              <target>
+                <mkdir dir="${project.build.directory}/native"/>
+                <exec executable="cmake" dir="${project.build.directory}/native" failonerror="true">
+                  <arg line="${basedir}/src/main/native"/>
+                </exec>
+                <exec executable="make" dir="${project.build.directory}/native" failonerror="true"/>
+              </target>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6f99a9d1/hadoop-hdfs-project/hadoop-hdfsdb/src/main/native/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfsdb/src/main/native/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfsdb/src/main/native/CMakeLists.txt
new file mode 100644
index 0000000..d21b897
--- /dev/null
+++ b/hadoop-hdfs-project/hadoop-hdfsdb/src/main/native/CMakeLists.txt
@@ -0,0 +1,11 @@
+cmake_minimum_required(VERSION 2.8)
+
+set(CMAKE_BUILD_TYPE Release)
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Wno-unused-parameter -Wno-sign-compare -fvisibility=hidden")
+
+if(APPLE)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+endif()
+
+add_subdirectory(hdfsdb)

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6f99a9d1/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
new file mode 100644
index 0000000..eb2b5b2
--- /dev/null
+++ b/hadoop-hdfs-project/hadoop-hdfsdb/src/main/native/hdfsdb/CMakeLists.txt
@@ -0,0 +1,64 @@
+cmake_minimum_required(VERSION 2.8)
+PROJECT(hdfsdb)
+
+ENABLE_TESTING()
+
+set(VERSION_MAJOR 1)
+set(VERSION_MINOR 15)
+set(VERRION_PATCH 0)
+set(VERSION_STRING ${VERSION_MAJOR}.${VERSION_MINOR})
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR} include)
+
+set(HDFSDBSRCS db/builder.cc db/db_impl.cc db/db_iter.cc db/dbformat.cc
+  db/filename.cc db/log_reader.cc db/log_writer.cc db/memtable.cc
+  db/repair.cc db/table_cache.cc db/version_edit.cc db/version_set.cc
+  db/write_batch.cc
+  helpers/memenv/memenv.cc
+  table/block_builder.cc table/block.cc table/filter_block.cc table/format.cc
+  table/iterator.cc table/merger.cc table/table_builder.cc table/table.cc
+  table/two_level_iterator.cc
+  util/arena.cc util/bloom.cc util/cache.cc util/coding.cc util/comparator.cc
+  util/crc32c.cc util/env.cc util/filter_policy.cc util/hash.cc util/histogram.cc
+  util/logging.cc util/options.cc util/status.cc
+)
+
+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})
+
+set(TESTHARNESS_SRCS util/testutil.cc util/testharness.cc)
+add_library(hdfsdb-test-harness ${TESTHARNESS_SRCS})
+
+macro(hdfsdb_tests)
+  get_filename_component(_tname ${ARGN} NAME_WE)
+  add_executable(${_tname} ${ARGN})
+  target_link_libraries(${_tname} hdfsdb hdfsdb-test-harness)
+  add_test(NAME ${_tname} COMMAND $<TARGET_FILE:${_tname}>)
+endmacro()
+
+hdfsdb_tests(util/arena_test.cc)
+hdfsdb_tests(db/autocompact_test.cc)
+hdfsdb_tests(util/bloom_test.cc)
+hdfsdb_tests(util/cache_test.cc)
+hdfsdb_tests(util/coding_test.cc)
+hdfsdb_tests(db/corruption_test.cc)
+hdfsdb_tests(util/crc32c_test.cc)
+hdfsdb_tests(db/db_test.cc)
+hdfsdb_tests(db/dbformat_test.cc)
+hdfsdb_tests(util/env_test.cc)
+hdfsdb_tests(db/filename_test.cc)
+hdfsdb_tests(table/filter_block_test.cc)
+hdfsdb_tests(issues/issue178_test.cc)
+hdfsdb_tests(issues/issue200_test.cc)
+hdfsdb_tests(db/log_test.cc)
+hdfsdb_tests(db/skiplist_test.cc)
+hdfsdb_tests(table/table_test.cc)
+hdfsdb_tests(db/version_edit_test.cc)
+hdfsdb_tests(db/version_set_test.cc)
+hdfsdb_tests(db/write_batch_test.cc)
+hdfsdb_tests(db/db_bench.cc)
+hdfsdb_tests(helpers/memenv/memenv_test.cc)

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6f99a9d1/hadoop-hdfs-project/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/pom.xml b/hadoop-hdfs-project/pom.xml
index 0a61c46..54f5e36 100644
--- a/hadoop-hdfs-project/pom.xml
+++ b/hadoop-hdfs-project/pom.xml
@@ -33,6 +33,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modules>
     <module>hadoop-hdfs</module>
     <module>hadoop-hdfs-client</module>
+    <module>hadoop-hdfsdb</module>
     <module>hadoop-hdfs-httpfs</module>
     <module>hadoop-hdfs/src/contrib/bkjournal</module>
     <module>hadoop-hdfs-nfs</module>