You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2017/12/04 23:52:10 UTC
[2/3] hbase git commit: HBASE-19419 Remove hbase-native-client from
branch-1
http://git-wip-us.apache.org/repos/asf/hbase/blob/d77792c8/hbase-native-client/src/core/hbase_macros.h
----------------------------------------------------------------------
diff --git a/hbase-native-client/src/core/hbase_macros.h b/hbase-native-client/src/core/hbase_macros.h
deleted file mode 100644
index 71765c8..0000000
--- a/hbase-native-client/src/core/hbase_macros.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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.
- *
- */
-
-#ifndef CORE_HBASE_MACROS_H_
-#define CORE_HBASE_MACROS_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * The following code block define API as the tag for exported
- * functions. The library should be compiled with symbols visibility
- * set to hidden by default and only the exported functions should be
- * tagged as HBASE_API.
- *
- * When building the library on Windows, compile with compiler flag
- * "-D_LIBHBASE_IMPLEMENTATION_", whereas when linking application with
- * this library, this compiler flag should not be used.
- */
-#if defined _WIN32 || defined __CYGWIN__
- #ifdef _LIBHBASE_IMPLEMENTATION_
- #define API __declspec(dllexport)
- #else
- #ifdef _LIBHBASE_TEST_
- #define HBASE_API
- #else
- #define HBASE_API __declspec(dllimport)
- #endif
- #endif
-#else
- #if __GNUC__ >= 4
- #define HBASE_API __attribute__ ((visibility ("default")))
- #else
- #define HBASE_API
- #endif
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
-#endif // __cplusplus
-
-#endif // CORE_HBASE_MACROS_H_
-
http://git-wip-us.apache.org/repos/asf/hbase/blob/d77792c8/hbase-native-client/src/core/hbase_types.h
----------------------------------------------------------------------
diff --git a/hbase-native-client/src/core/hbase_types.h b/hbase-native-client/src/core/hbase_types.h
deleted file mode 100644
index 8889b92..0000000
--- a/hbase-native-client/src/core/hbase_types.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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.
- *
- */
-
-#ifndef CORE_HBASE_TYPES_H_
-#define CORE_HBASE_TYPES_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-
-typedef unsigned char hb_byte_t;
-
-/*
- * Base kv type.
- */
-typedef struct {
- hb_byte_t* row;
- size_t row_length;
-
- char * family;
- size_t family_length;
-
- hb_byte_t* qual;
- size_t qual_length;
-
- hb_byte_t* value;
- size_t value_length;
-
- uint64_t timestamp;
-} hb_cell_t;
-
-typedef enum {
- DELETE_ONE_VERSION,
- DELETE_MULTIPLE_VERSIONS,
- DELETE_FAMILY,
- DELETE_FAMILY_VERSION
-} hb_delete_type;
-
-typedef enum {
- USE_DEFAULT,
- SKIP_WAL,
- ASYNC_WAL,
- SYNC_WAL,
- HSYNC_WAL
-} hb_durability_type;
-
-typedef void* hb_admin_t;
-typedef void* hb_client_t;
-typedef void* hb_connection_attr_t;
-typedef void* hb_connection_t;
-typedef void* hb_get_t;
-typedef void* hb_mutation_t;
-typedef void* hb_put_t;
-typedef void* hb_delete_t;
-typedef void* hb_increment_t;
-typedef void* hb_append_t;
-typedef void* hb_result_t;
-typedef void* hb_scanner_t;
-
-#ifdef __cplusplus
-} // extern "C"
-#endif // __cplusplus
-
-#endif // CORE_HBASE_TYPES_H_
http://git-wip-us.apache.org/repos/asf/hbase/blob/d77792c8/hbase-native-client/src/core/mutation.cc
----------------------------------------------------------------------
diff --git a/hbase-native-client/src/core/mutation.cc b/hbase-native-client/src/core/mutation.cc
deleted file mode 100644
index 4855076..0000000
--- a/hbase-native-client/src/core/mutation.cc
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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.
- *
- */
-
-#include "core/mutation.h"
-
-void Mutation::set_namespace(char * name_space, size_t name_space_length) {
- this->name_space = name_space;
- this->name_space_length = name_space_length;
-}
-
-void Mutation::set_table(char * table, size_t table_length) {
- this->table = table;
- this->table_length = table_length;
-}
-
-void Mutation::set_row(unsigned char * row, size_t row_length) {
- this->row = row;
- this->row_length = row_length;
-}
-
-void Mutation::set_durability(hb_durability_type durability) {
- this->durability = durability;
-}
-
-Mutation::~Mutation() {
-}
http://git-wip-us.apache.org/repos/asf/hbase/blob/d77792c8/hbase-native-client/src/core/mutation.h
----------------------------------------------------------------------
diff --git a/hbase-native-client/src/core/mutation.h b/hbase-native-client/src/core/mutation.h
deleted file mode 100644
index e35d595..0000000
--- a/hbase-native-client/src/core/mutation.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.
- *
- */
-
-#ifndef CORE_MUTATION_H_
-#define CORE_MUTATION_H_
-
-#include <stdlib.h>
-
-#include "core/hbase_types.h"
-
-class Mutation {
- char * name_space;
- size_t name_space_length;
-
- char * table;
- size_t table_length;
-
- unsigned char * row;
- size_t row_length;
-
- hb_durability_type durability;
- public:
- void set_namespace(char * name_space, size_t name_space_length);
- void set_table(char * table, size_t table_length);
- void set_row(unsigned char * row, size_t row_length);
- void set_durability(hb_durability_type durability);
-
- virtual ~Mutation();
-};
-#endif // CORE_MUTATION_H_
-
-
http://git-wip-us.apache.org/repos/asf/hbase/blob/d77792c8/hbase-native-client/src/core/put.cc
----------------------------------------------------------------------
diff --git a/hbase-native-client/src/core/put.cc b/hbase-native-client/src/core/put.cc
deleted file mode 100644
index 8bedc8b..0000000
--- a/hbase-native-client/src/core/put.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * 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.
- */
-
-#include "core/put.h"
-
-Put::~Put() {
-}
http://git-wip-us.apache.org/repos/asf/hbase/blob/d77792c8/hbase-native-client/src/core/put.h
----------------------------------------------------------------------
diff --git a/hbase-native-client/src/core/put.h b/hbase-native-client/src/core/put.h
deleted file mode 100644
index 7bca3e3..0000000
--- a/hbase-native-client/src/core/put.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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.
- *
- */
-
-#ifndef CORE_PUT_H_
-#define CORE_PUT_H_
-
-#include "core/mutation.h"
-
-class Put: public Mutation {
- public:
- ~Put();
-};
-#endif // CORE_PUT_H_
http://git-wip-us.apache.org/repos/asf/hbase/blob/d77792c8/hbase-native-client/src/core/scanner.cc
----------------------------------------------------------------------
diff --git a/hbase-native-client/src/core/scanner.cc b/hbase-native-client/src/core/scanner.cc
deleted file mode 100644
index a10e444..0000000
--- a/hbase-native-client/src/core/scanner.cc
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * 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.
- *
- */
-
-#include "core/scanner.h"
http://git-wip-us.apache.org/repos/asf/hbase/blob/d77792c8/hbase-native-client/src/core/scanner.h
----------------------------------------------------------------------
diff --git a/hbase-native-client/src/core/scanner.h b/hbase-native-client/src/core/scanner.h
deleted file mode 100644
index 257583b..0000000
--- a/hbase-native-client/src/core/scanner.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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.
- *
- */
-
-#ifndef CORE_SCANNER_H_
-#define CORE_SCANNER_H_
-
-class Scanner {
-};
-#endif // CORE_SCANNER_H_
http://git-wip-us.apache.org/repos/asf/hbase/blob/d77792c8/hbase-native-client/src/rpc/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/hbase-native-client/src/rpc/CMakeLists.txt b/hbase-native-client/src/rpc/CMakeLists.txt
deleted file mode 100644
index 2456923..0000000
--- a/hbase-native-client/src/rpc/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-# 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.
-
http://git-wip-us.apache.org/repos/asf/hbase/blob/d77792c8/hbase-native-client/src/sync/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/hbase-native-client/src/sync/CMakeLists.txt b/hbase-native-client/src/sync/CMakeLists.txt
deleted file mode 100644
index bfb7e6c..0000000
--- a/hbase-native-client/src/sync/CMakeLists.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-# 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.
-
-set( SYNC_SRC
- hbase_connection.cc
- hbase_admin.cc
-)
-
-
-add_library(hsync OBJECT ${SYNC_SRC})
http://git-wip-us.apache.org/repos/asf/hbase/blob/d77792c8/hbase-native-client/src/sync/hbase_admin.cc
----------------------------------------------------------------------
diff --git a/hbase-native-client/src/sync/hbase_admin.cc b/hbase-native-client/src/sync/hbase_admin.cc
deleted file mode 100644
index d43c8ec..0000000
--- a/hbase-native-client/src/sync/hbase_admin.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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.
- *
- */
-
-#include "sync/hbase_admin.h"
-
-#include <stdlib.h>
-#include <stdbool.h>
-
-#include "core/admin.h"
-
-int32_t hb_admin_create(hb_admin_t** admin_ptr) {
- (*admin_ptr) = reinterpret_cast<hb_admin_t *>(new Admin());
- return 0;
-}
-
-/*
- * Disconnect the admin releasing any internal objects
- * or connections created in the background.
- */
-int32_t hb_admin_destroy(hb_admin_t * admin) {
- Admin * adm = reinterpret_cast<Admin *>(admin);
- delete adm;
- return 0;
-}
-
-/*
- * See if a table exists.
- */
-int32_t hb_admin_table_exists(hb_admin_t * admin,
- char * name_space, size_t name_space_length,
- char * table, size_t table_length,
- bool * exists) {
- *exists = true;
- return 0;
-}
http://git-wip-us.apache.org/repos/asf/hbase/blob/d77792c8/hbase-native-client/src/sync/hbase_admin.h
----------------------------------------------------------------------
diff --git a/hbase-native-client/src/sync/hbase_admin.h b/hbase-native-client/src/sync/hbase_admin.h
deleted file mode 100644
index 860bfba..0000000
--- a/hbase-native-client/src/sync/hbase_admin.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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.
- *
- */
-
-#ifndef SYNC_HBASE_ADMIN_H_
-#define SYNC_HBASE_ADMIN_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdlib.h>
-#include <stdbool.h>
-
-#include "core/hbase_macros.h"
-#include "core/hbase_types.h"
-#include "sync/hbase_connection.h"
-
-
-/**
- * Create a new hb_admin.
- * All fields are initialized to the defaults. If you want to set
- * connection or other properties, set those before calling any
- * RPC functions.
- */
-HBASE_API int32_t hb_admin_create(hb_admin_t* admin_ptr,
- hb_connection_t connection);
-
-/*
- * Disconnect the admin releasing any internal objects
- * or connections created in the background.
- */
-HBASE_API int32_t hb_admin_destroy(hb_admin_t admin);
-
-/*
- * See if a table exists.
- */
-HBASE_API int32_t hb_admin_table_exists(hb_admin_t admin,
- char * name_space, size_t name_space_length,
- char * table, size_t table_length, bool * exists);
-
-#ifdef __cplusplus
-} // extern "C"
-#endif // __cplusplus
-
-#endif // SYNC_HBASE_ADMIN_H_
http://git-wip-us.apache.org/repos/asf/hbase/blob/d77792c8/hbase-native-client/src/sync/hbase_connection.cc
----------------------------------------------------------------------
diff --git a/hbase-native-client/src/sync/hbase_connection.cc b/hbase-native-client/src/sync/hbase_connection.cc
deleted file mode 100644
index df05376..0000000
--- a/hbase-native-client/src/sync/hbase_connection.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.
- *
- */
-
-#include "sync/hbase_connection.h"
-
-#include "core/connection.h"
-#include "core/hbase_types.h"
-
-extern "C" {
-int32_t hb_connection_create(hb_connection_t * connection_ptr,
- hb_connection_attr_t connection_attr) {
- (*connection_ptr) = reinterpret_cast<hb_connection_t>(new Connection());
- if ((*connection_ptr) == NULL)
- return -1;
- return 0;
-}
-int32_t hb_connection_destroy(hb_connection_t connection) {
- free(connection);
- return 0;
-}
-} // extern "C"
http://git-wip-us.apache.org/repos/asf/hbase/blob/d77792c8/hbase-native-client/src/sync/hbase_connection.h
----------------------------------------------------------------------
diff --git a/hbase-native-client/src/sync/hbase_connection.h b/hbase-native-client/src/sync/hbase_connection.h
deleted file mode 100644
index af9284d..0000000
--- a/hbase-native-client/src/sync/hbase_connection.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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.
- *
- */
-
-#ifndef SYNC_HBASE_CONNECTION_H_
-#define SYNC_HBASE_CONNECTION_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "core/hbase_macros.h"
-#include "core/hbase_types.h"
-#include "core/hbase_connection_attr.h"
-
-#include <stdlib.h>
-
-/**
- * Create an hb_connection.
- *
- * if connection_attr is null everything will be left as default
- */
-HBASE_API int32_t hb_connection_create(hb_connection_t * connection_ptr,
- hb_connection_attr_t connection_attr);
-
-/**
- * Destroy the connection and free all resources allocated at creation
- * time.
- */
-HBASE_API int32_t hb_connection_destroy(hb_connection_t connection);
-
-#ifdef __cplusplus
-} // extern "C"
-#endif // __cplusplus
-
-#endif // SYNC_HBASE_CONNECTION_H_
-