HDFS-9207. Move the implementation to the hdfs-native-client module. Contributed by Haohui Mai.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/4cd3b992 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/4cd3b992 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/4cd3b992 Branch: refs/heads/HDFS-8707 Commit: 4cd3b9929ebb38a3b177646fc4da2e8b108ddd2b Parents: 1b05389 Author: Haohui Mai <[email protected]> Authored: Thu Oct 8 15:54:36 2015 -0700 Committer: Haohui Mai <[email protected]> Committed: Thu Oct 8 15:54:36 2015 -0700 ---------------------------------------------------------------------- .../src/main/native/CMakeLists.txt | 23 - .../src/main/native/libhdfspp/CMakeLists.txt | 59 - .../src/main/native/libhdfspp/doc/Doxyfile.in | 17 - .../src/main/native/libhdfspp/doc/mainpage.dox | 8 - .../native/libhdfspp/include/libhdfspp/hdfs.h | 108 - .../libhdfspp/include/libhdfspp/options.h | 35 - .../native/libhdfspp/include/libhdfspp/status.h | 98 - .../main/native/libhdfspp/lib/CMakeLists.txt | 23 - .../native/libhdfspp/lib/common/CMakeLists.txt | 1 - .../main/native/libhdfspp/lib/common/base64.cc | 71 - .../libhdfspp/lib/common/continuation/asio.h | 144 - .../lib/common/continuation/continuation.h | 138 - .../lib/common/continuation/protobuf.h | 130 - .../libhdfspp/lib/common/hdfs_public_api.cc | 29 - .../libhdfspp/lib/common/hdfs_public_api.h | 42 - .../main/native/libhdfspp/lib/common/logging.h | 61 - .../main/native/libhdfspp/lib/common/options.cc | 27 - .../libhdfspp/lib/common/sasl_authenticator.h | 66 - .../libhdfspp/lib/common/sasl_digest_md5.cc | 240 - .../main/native/libhdfspp/lib/common/status.cc | 66 - .../src/main/native/libhdfspp/lib/common/util.h | 58 - .../main/native/libhdfspp/lib/fs/CMakeLists.txt | 2 - .../main/native/libhdfspp/lib/fs/filesystem.cc | 106 - .../main/native/libhdfspp/lib/fs/filesystem.h | 78 - .../main/native/libhdfspp/lib/fs/inputstream.cc | 46 - .../native/libhdfspp/lib/fs/inputstream_impl.h | 193 - .../native/libhdfspp/lib/proto/CMakeLists.txt | 63 - .../native/libhdfspp/lib/proto/cpp_helpers.h | 82 - .../libhdfspp/lib/proto/protoc_gen_hrpc.cc | 95 - .../native/libhdfspp/lib/reader/CMakeLists.txt | 20 - .../native/libhdfspp/lib/reader/block_reader.h | 114 - .../native/libhdfspp/lib/reader/datatransfer.cc | 52 - .../native/libhdfspp/lib/reader/datatransfer.h | 63 - .../libhdfspp/lib/reader/datatransfer_impl.h | 144 - .../libhdfspp/lib/reader/remote_block_reader.cc | 46 - .../lib/reader/remote_block_reader_impl.h | 342 - .../native/libhdfspp/lib/rpc/CMakeLists.txt | 3 - .../native/libhdfspp/lib/rpc/rpc_connection.cc | 270 - .../native/libhdfspp/lib/rpc/rpc_connection.h | 158 - .../main/native/libhdfspp/lib/rpc/rpc_engine.cc | 97 - .../main/native/libhdfspp/lib/rpc/rpc_engine.h | 172 - .../main/native/libhdfspp/tests/CMakeLists.txt | 43 - .../native/libhdfspp/tests/inputstream_test.cc | 227 - .../native/libhdfspp/tests/mock_connection.cc | 29 - .../native/libhdfspp/tests/mock_connection.h | 69 - .../libhdfspp/tests/remote_block_reader_test.cc | 283 - .../native/libhdfspp/tests/rpc_engine_test.cc | 179 - .../libhdfspp/tests/sasl_digest_md5_test.cc | 44 - .../libhdfspp/third_party/asio-1.10.2/COPYING | 4 - .../third_party/asio-1.10.2/include/asio.hpp | 122 - .../asio-1.10.2/include/asio/async_result.hpp | 94 - .../include/asio/basic_datagram_socket.hpp | 949 - .../include/asio/basic_deadline_timer.hpp | 520 - .../include/asio/basic_io_object.hpp | 240 - .../include/asio/basic_raw_socket.hpp | 940 - .../include/asio/basic_seq_packet_socket.hpp | 565 - .../include/asio/basic_serial_port.hpp | 695 - .../include/asio/basic_signal_set.hpp | 384 - .../asio-1.10.2/include/asio/basic_socket.hpp | 1518 -- .../include/asio/basic_socket_acceptor.hpp | 1136 - .../include/asio/basic_socket_iostream.hpp | 286 - .../include/asio/basic_socket_streambuf.hpp | 567 - .../include/asio/basic_stream_socket.hpp | 852 - .../include/asio/basic_streambuf.hpp | 369 - .../include/asio/basic_streambuf_fwd.hpp | 33 - .../include/asio/basic_waitable_timer.hpp | 519 - .../asio-1.10.2/include/asio/buffer.hpp | 2239 -- .../include/asio/buffered_read_stream.hpp | 244 - .../include/asio/buffered_read_stream_fwd.hpp | 25 - .../include/asio/buffered_stream.hpp | 258 - .../include/asio/buffered_stream_fwd.hpp | 25 - .../include/asio/buffered_write_stream.hpp | 236 - .../include/asio/buffered_write_stream_fwd.hpp | 25 - .../include/asio/buffers_iterator.hpp | 481 - .../include/asio/completion_condition.hpp | 218 - .../asio-1.10.2/include/asio/connect.hpp | 823 - .../asio-1.10.2/include/asio/coroutine.hpp | 328 - .../include/asio/datagram_socket_service.hpp | 432 - .../asio-1.10.2/include/asio/deadline_timer.hpp | 63 - .../include/asio/deadline_timer_service.hpp | 173 - .../include/asio/detail/addressof.hpp | 38 - .../asio-1.10.2/include/asio/detail/array.hpp | 38 - .../include/asio/detail/array_fwd.hpp | 34 - .../asio-1.10.2/include/asio/detail/assert.hpp | 32 - .../include/asio/detail/atomic_count.hpp | 45 - .../asio/detail/base_from_completion_cond.hpp | 68 - .../include/asio/detail/bind_handler.hpp | 489 - .../include/asio/detail/buffer_resize_guard.hpp | 66 - .../asio/detail/buffer_sequence_adapter.hpp | 383 - .../asio/detail/buffered_stream_storage.hpp | 126 - .../include/asio/detail/call_stack.hpp | 125 - .../include/asio/detail/chrono_time_traits.hpp | 190 - .../include/asio/detail/completion_handler.hpp | 81 - .../asio-1.10.2/include/asio/detail/config.hpp | 895 - .../include/asio/detail/consuming_buffers.hpp | 292 - .../asio-1.10.2/include/asio/detail/cstdint.hpp | 46 - .../include/asio/detail/date_time_fwd.hpp | 34 - .../asio/detail/deadline_timer_service.hpp | 227 - .../include/asio/detail/dependent_type.hpp | 36 - .../include/asio/detail/descriptor_ops.hpp | 117 - .../include/asio/detail/descriptor_read_op.hpp | 119 - .../include/asio/detail/descriptor_write_op.hpp | 119 - .../include/asio/detail/dev_poll_reactor.hpp | 210 - .../include/asio/detail/epoll_reactor.hpp | 242 - .../asio-1.10.2/include/asio/detail/event.hpp | 48 - .../asio/detail/eventfd_select_interrupter.hpp | 83 - .../include/asio/detail/fd_set_adapter.hpp | 39 - .../include/asio/detail/fenced_block.hpp | 76 - .../include/asio/detail/function.hpp | 38 - .../asio/detail/gcc_arm_fenced_block.hpp | 89 - .../asio/detail/gcc_hppa_fenced_block.hpp | 66 - .../asio/detail/gcc_sync_fenced_block.hpp | 63 - .../asio/detail/gcc_x86_fenced_block.hpp | 89 - .../asio/detail/handler_alloc_helpers.hpp | 82 - .../asio/detail/handler_cont_helpers.hpp | 45 - .../asio/detail/handler_invoke_helpers.hpp | 57 - .../include/asio/detail/handler_tracking.hpp | 159 - .../asio/detail/handler_type_requirements.hpp | 488 - .../include/asio/detail/hash_map.hpp | 331 - .../detail/impl/buffer_sequence_adapter.ipp | 118 - .../include/asio/detail/impl/descriptor_ops.ipp | 451 - .../asio/detail/impl/dev_poll_reactor.hpp | 78 - .../asio/detail/impl/dev_poll_reactor.ipp | 445 - .../include/asio/detail/impl/epoll_reactor.hpp | 76 - .../include/asio/detail/impl/epoll_reactor.ipp | 662 - .../detail/impl/eventfd_select_interrupter.ipp | 165 - .../asio/detail/impl/handler_tracking.ipp | 305 - .../include/asio/detail/impl/kqueue_reactor.hpp | 80 - .../include/asio/detail/impl/kqueue_reactor.ipp | 463 - .../detail/impl/pipe_select_interrupter.ipp | 124 - .../include/asio/detail/impl/posix_event.ipp | 47 - .../include/asio/detail/impl/posix_mutex.ipp | 46 - .../include/asio/detail/impl/posix_thread.ipp | 74 - .../include/asio/detail/impl/posix_tss_ptr.ipp | 46 - .../detail/impl/reactive_descriptor_service.ipp | 208 - .../impl/reactive_serial_port_service.ipp | 151 - .../impl/reactive_socket_service_base.ipp | 267 - .../asio/detail/impl/resolver_service_base.ipp | 130 - .../include/asio/detail/impl/select_reactor.hpp | 87 - .../include/asio/detail/impl/select_reactor.ipp | 313 - .../asio/detail/impl/service_registry.hpp | 88 - .../asio/detail/impl/service_registry.ipp | 188 - .../asio/detail/impl/signal_set_service.ipp | 647 - .../include/asio/detail/impl/socket_ops.ipp | 3394 --- .../detail/impl/socket_select_interrupter.ipp | 175 - .../include/asio/detail/impl/strand_service.hpp | 118 - .../include/asio/detail/impl/strand_service.ipp | 176 - .../asio/detail/impl/task_io_service.hpp | 78 - .../asio/detail/impl/task_io_service.ipp | 474 - .../include/asio/detail/impl/throw_error.ipp | 60 - .../asio/detail/impl/timer_queue_ptime.ipp | 84 - .../asio/detail/impl/timer_queue_set.ipp | 101 - .../include/asio/detail/impl/win_event.ipp | 67 - .../detail/impl/win_iocp_handle_service.ipp | 528 - .../asio/detail/impl/win_iocp_io_service.hpp | 130 - .../asio/detail/impl/win_iocp_io_service.ipp | 531 - .../impl/win_iocp_serial_port_service.ipp | 180 - .../impl/win_iocp_socket_service_base.ipp | 728 - .../include/asio/detail/impl/win_mutex.ipp | 78 - .../detail/impl/win_object_handle_service.ipp | 444 - .../asio/detail/impl/win_static_mutex.ipp | 118 - .../include/asio/detail/impl/win_thread.ipp | 139 - .../include/asio/detail/impl/win_tss_ptr.ipp | 57 - .../detail/impl/winrt_ssocket_service_base.ipp | 612 - .../asio/detail/impl/winrt_timer_scheduler.hpp | 79 - .../asio/detail/impl/winrt_timer_scheduler.ipp | 122 - .../include/asio/detail/impl/winsock_init.ipp | 82 - .../include/asio/detail/io_control.hpp | 134 - .../include/asio/detail/keyword_tss_ptr.hpp | 70 - .../include/asio/detail/kqueue_reactor.hpp | 219 - .../asio-1.10.2/include/asio/detail/limits.hpp | 26 - .../asio/detail/local_free_on_block_exit.hpp | 57 - .../include/asio/detail/macos_fenced_block.hpp | 61 - .../asio-1.10.2/include/asio/detail/mutex.hpp | 48 - .../include/asio/detail/noncopyable.hpp | 43 - .../include/asio/detail/null_event.hpp | 88 - .../include/asio/detail/null_fenced_block.hpp | 45 - .../include/asio/detail/null_mutex.hpp | 64 - .../include/asio/detail/null_reactor.hpp | 67 - .../include/asio/detail/null_signal_blocker.hpp | 69 - .../include/asio/detail/null_socket_service.hpp | 497 - .../include/asio/detail/null_static_mutex.hpp | 60 - .../include/asio/detail/null_thread.hpp | 61 - .../include/asio/detail/null_tss_ptr.hpp | 68 - .../include/asio/detail/object_pool.hpp | 146 - .../include/asio/detail/old_win_sdk_compat.hpp | 214 - .../include/asio/detail/op_queue.hpp | 156 - .../include/asio/detail/operation.hpp | 38 - .../asio/detail/pipe_select_interrupter.hpp | 89 - .../include/asio/detail/pop_options.hpp | 105 - .../include/asio/detail/posix_event.hpp | 126 - .../asio/detail/posix_fd_set_adapter.hpp | 118 - .../include/asio/detail/posix_mutex.hpp | 76 - .../asio/detail/posix_signal_blocker.hpp | 85 - .../include/asio/detail/posix_static_mutex.hpp | 64 - .../include/asio/detail/posix_thread.hpp | 105 - .../include/asio/detail/posix_tss_ptr.hpp | 79 - .../include/asio/detail/push_options.hpp | 138 - .../asio/detail/reactive_descriptor_service.hpp | 322 - .../asio/detail/reactive_null_buffers_op.hpp | 88 - .../detail/reactive_serial_port_service.hpp | 234 - .../asio/detail/reactive_socket_accept_op.hpp | 136 - .../asio/detail/reactive_socket_connect_op.hpp | 106 - .../asio/detail/reactive_socket_recv_op.hpp | 123 - .../asio/detail/reactive_socket_recvfrom_op.hpp | 133 - .../asio/detail/reactive_socket_recvmsg_op.hpp | 125 - .../asio/detail/reactive_socket_send_op.hpp | 120 - .../asio/detail/reactive_socket_sendto_op.hpp | 123 - .../asio/detail/reactive_socket_service.hpp | 457 - .../detail/reactive_socket_service_base.hpp | 450 - .../asio-1.10.2/include/asio/detail/reactor.hpp | 32 - .../include/asio/detail/reactor_fwd.hpp | 40 - .../include/asio/detail/reactor_op.hpp | 61 - .../include/asio/detail/reactor_op_queue.hpp | 168 - .../include/asio/detail/regex_fwd.hpp | 35 - .../include/asio/detail/resolve_endpoint_op.hpp | 121 - .../include/asio/detail/resolve_op.hpp | 131 - .../include/asio/detail/resolver_service.hpp | 129 - .../asio/detail/resolver_service_base.hpp | 129 - .../include/asio/detail/scoped_lock.hpp | 101 - .../include/asio/detail/scoped_ptr.hpp | 79 - .../include/asio/detail/select_interrupter.hpp | 46 - .../include/asio/detail/select_reactor.hpp | 219 - .../include/asio/detail/service_registry.hpp | 156 - .../include/asio/detail/shared_ptr.hpp | 38 - .../include/asio/detail/signal_blocker.hpp | 44 - .../include/asio/detail/signal_handler.hpp | 82 - .../include/asio/detail/signal_init.hpp | 47 - .../include/asio/detail/signal_op.hpp | 49 - .../include/asio/detail/signal_set_service.hpp | 216 - .../include/asio/detail/socket_holder.hpp | 98 - .../include/asio/detail/socket_ops.hpp | 334 - .../include/asio/detail/socket_option.hpp | 316 - .../asio/detail/socket_select_interrupter.hpp | 91 - .../include/asio/detail/socket_types.hpp | 404 - .../asio/detail/solaris_fenced_block.hpp | 61 - .../include/asio/detail/static_mutex.hpp | 52 - .../include/asio/detail/std_event.hpp | 176 - .../include/asio/detail/std_mutex.hpp | 73 - .../include/asio/detail/std_static_mutex.hpp | 81 - .../include/asio/detail/std_thread.hpp | 65 - .../include/asio/detail/strand_service.hpp | 142 - .../include/asio/detail/task_io_service.hpp | 201 - .../asio/detail/task_io_service_operation.hpp | 76 - .../asio/detail/task_io_service_thread_info.hpp | 40 - .../asio-1.10.2/include/asio/detail/thread.hpp | 56 - .../include/asio/detail/thread_info_base.hpp | 91 - .../include/asio/detail/throw_error.hpp | 53 - .../include/asio/detail/throw_exception.hpp | 51 - .../include/asio/detail/timer_queue.hpp | 332 - .../include/asio/detail/timer_queue_base.hpp | 68 - .../include/asio/detail/timer_queue_ptime.hpp | 93 - .../include/asio/detail/timer_queue_set.hpp | 66 - .../include/asio/detail/timer_scheduler.hpp | 35 - .../include/asio/detail/timer_scheduler_fwd.hpp | 40 - .../asio-1.10.2/include/asio/detail/tss_ptr.hpp | 69 - .../include/asio/detail/type_traits.hpp | 58 - .../include/asio/detail/variadic_templates.hpp | 63 - .../include/asio/detail/wait_handler.hpp | 83 - .../asio-1.10.2/include/asio/detail/wait_op.hpp | 45 - .../include/asio/detail/weak_ptr.hpp | 38 - .../include/asio/detail/win_event.hpp | 126 - .../include/asio/detail/win_fd_set_adapter.hpp | 149 - .../include/asio/detail/win_fenced_block.hpp | 89 - .../asio/detail/win_iocp_handle_read_op.hpp | 109 - .../asio/detail/win_iocp_handle_service.hpp | 322 - .../asio/detail/win_iocp_handle_write_op.hpp | 101 - .../include/asio/detail/win_iocp_io_service.hpp | 315 - .../asio/detail/win_iocp_null_buffers_op.hpp | 119 - .../include/asio/detail/win_iocp_operation.hpp | 95 - .../asio/detail/win_iocp_overlapped_op.hpp | 88 - .../asio/detail/win_iocp_overlapped_ptr.hpp | 144 - .../detail/win_iocp_serial_port_service.hpp | 228 - .../asio/detail/win_iocp_socket_accept_op.hpp | 165 - .../asio/detail/win_iocp_socket_connect_op.hpp | 124 - .../asio/detail/win_iocp_socket_recv_op.hpp | 115 - .../asio/detail/win_iocp_socket_recvfrom_op.hpp | 123 - .../asio/detail/win_iocp_socket_recvmsg_op.hpp | 116 - .../asio/detail/win_iocp_socket_send_op.hpp | 109 - .../asio/detail/win_iocp_socket_service.hpp | 525 - .../detail/win_iocp_socket_service_base.hpp | 524 - .../asio/detail/win_iocp_thread_info.hpp | 34 - .../include/asio/detail/win_mutex.hpp | 78 - .../asio/detail/win_object_handle_service.hpp | 183 - .../include/asio/detail/win_static_mutex.hpp | 74 - .../include/asio/detail/win_thread.hpp | 139 - .../include/asio/detail/win_tss_ptr.hpp | 79 - .../include/asio/detail/wince_thread.hpp | 116 - .../include/asio/detail/winrt_async_manager.hpp | 294 - .../include/asio/detail/winrt_async_op.hpp | 65 - .../include/asio/detail/winrt_resolve_op.hpp | 117 - .../asio/detail/winrt_resolver_service.hpp | 183 - .../asio/detail/winrt_socket_connect_op.hpp | 90 - .../asio/detail/winrt_socket_recv_op.hpp | 110 - .../asio/detail/winrt_socket_send_op.hpp | 101 - .../asio/detail/winrt_ssocket_service.hpp | 232 - .../asio/detail/winrt_ssocket_service_base.hpp | 355 - .../asio/detail/winrt_timer_scheduler.hpp | 131 - .../include/asio/detail/winrt_utils.hpp | 106 - .../include/asio/detail/winsock_init.hpp | 128 - .../include/asio/detail/wrapped_handler.hpp | 291 - .../asio-1.10.2/include/asio/error.hpp | 331 - .../asio-1.10.2/include/asio/error_code.hpp | 188 - .../include/asio/generic/basic_endpoint.hpp | 193 - .../include/asio/generic/datagram_protocol.hpp | 123 - .../include/asio/generic/detail/endpoint.hpp | 133 - .../asio/generic/detail/impl/endpoint.ipp | 109 - .../include/asio/generic/raw_protocol.hpp | 121 - .../asio/generic/seq_packet_protocol.hpp | 122 - .../include/asio/generic/stream_protocol.hpp | 127 - .../include/asio/handler_alloc_hook.hpp | 81 - .../include/asio/handler_continuation_hook.hpp | 54 - .../include/asio/handler_invoke_hook.hpp | 85 - .../asio-1.10.2/include/asio/handler_type.hpp | 112 - .../include/asio/high_resolution_timer.hpp | 63 - .../include/asio/impl/buffered_read_stream.hpp | 358 - .../include/asio/impl/buffered_write_stream.hpp | 338 - .../asio-1.10.2/include/asio/impl/connect.hpp | 428 - .../asio-1.10.2/include/asio/impl/error.ipp | 128 - .../include/asio/impl/error_code.ipp | 128 - .../include/asio/impl/handler_alloc_hook.ipp | 77 - .../include/asio/impl/io_service.hpp | 152 - .../include/asio/impl/io_service.ipp | 155 - .../asio-1.10.2/include/asio/impl/read.hpp | 753 - .../asio-1.10.2/include/asio/impl/read_at.hpp | 810 - .../include/asio/impl/read_until.hpp | 1147 - .../include/asio/impl/serial_port_base.hpp | 59 - .../include/asio/impl/serial_port_base.ipp | 554 - .../asio-1.10.2/include/asio/impl/spawn.hpp | 336 - .../asio-1.10.2/include/asio/impl/src.cpp | 25 - .../asio-1.10.2/include/asio/impl/src.hpp | 74 - .../include/asio/impl/use_future.hpp | 172 - .../asio-1.10.2/include/asio/impl/write.hpp | 765 - .../asio-1.10.2/include/asio/impl/write_at.hpp | 825 - .../asio-1.10.2/include/asio/io_service.hpp | 770 - .../asio-1.10.2/include/asio/ip/address.hpp | 200 - .../asio-1.10.2/include/asio/ip/address_v4.hpp | 241 - .../asio-1.10.2/include/asio/ip/address_v6.hpp | 246 - .../include/asio/ip/basic_endpoint.hpp | 263 - .../include/asio/ip/basic_resolver.hpp | 268 - .../include/asio/ip/basic_resolver_entry.hpp | 94 - .../include/asio/ip/basic_resolver_iterator.hpp | 260 - .../include/asio/ip/basic_resolver_query.hpp | 244 - .../include/asio/ip/detail/endpoint.hpp | 139 - .../include/asio/ip/detail/impl/endpoint.ipp | 204 - .../include/asio/ip/detail/socket_option.hpp | 569 - .../asio-1.10.2/include/asio/ip/host_name.hpp | 42 - .../asio-1.10.2/include/asio/ip/icmp.hpp | 115 - .../include/asio/ip/impl/address.hpp | 53 - .../include/asio/ip/impl/address.ipp | 226 - .../include/asio/ip/impl/address_v4.hpp | 53 - .../include/asio/ip/impl/address_v4.ipp | 178 - .../include/asio/ip/impl/address_v6.hpp | 53 - .../include/asio/ip/impl/address_v6.ipp | 298 - .../include/asio/ip/impl/basic_endpoint.hpp | 55 - .../include/asio/ip/impl/host_name.ipp | 54 - .../asio-1.10.2/include/asio/ip/multicast.hpp | 191 - .../include/asio/ip/resolver_query_base.hpp | 130 - .../include/asio/ip/resolver_service.hpp | 176 - .../asio-1.10.2/include/asio/ip/tcp.hpp | 155 - .../asio-1.10.2/include/asio/ip/udp.hpp | 111 - .../asio-1.10.2/include/asio/ip/unicast.hpp | 70 - .../asio-1.10.2/include/asio/ip/v6_only.hpp | 69 - .../include/asio/is_read_buffered.hpp | 59 - .../include/asio/is_write_buffered.hpp | 59 - .../include/asio/local/basic_endpoint.hpp | 239 - .../include/asio/local/connect_pair.hpp | 104 - .../include/asio/local/datagram_protocol.hpp | 80 - .../include/asio/local/detail/endpoint.hpp | 133 - .../include/asio/local/detail/impl/endpoint.ipp | 128 - .../include/asio/local/stream_protocol.hpp | 90 - .../asio-1.10.2/include/asio/placeholders.hpp | 123 - .../include/asio/posix/basic_descriptor.hpp | 490 - .../asio/posix/basic_stream_descriptor.hpp | 362 - .../include/asio/posix/descriptor_base.hpp | 97 - .../include/asio/posix/stream_descriptor.hpp | 37 - .../asio/posix/stream_descriptor_service.hpp | 260 - .../include/asio/raw_socket_service.hpp | 432 - .../asio-1.10.2/include/asio/read.hpp | 631 - .../asio-1.10.2/include/asio/read_at.hpp | 664 - .../asio-1.10.2/include/asio/read_until.hpp | 923 - .../include/asio/seq_packet_socket_service.hpp | 380 - .../asio-1.10.2/include/asio/serial_port.hpp | 36 - .../include/asio/serial_port_base.hpp | 167 - .../include/asio/serial_port_service.hpp | 253 - .../asio-1.10.2/include/asio/signal_set.hpp | 28 - .../include/asio/signal_set_service.hpp | 134 - .../include/asio/socket_acceptor_service.hpp | 302 - .../asio-1.10.2/include/asio/socket_base.hpp | 520 - .../asio-1.10.2/include/asio/spawn.hpp | 265 - .../asio-1.10.2/include/asio/ssl.hpp | 30 - .../include/asio/ssl/basic_context.hpp | 40 - .../asio-1.10.2/include/asio/ssl/context.hpp | 787 - .../include/asio/ssl/context_base.hpp | 167 - .../include/asio/ssl/context_service.hpp | 40 - .../asio/ssl/detail/buffered_handshake_op.hpp | 110 - .../include/asio/ssl/detail/engine.hpp | 164 - .../include/asio/ssl/detail/handshake_op.hpp | 68 - .../include/asio/ssl/detail/impl/engine.ipp | 326 - .../asio/ssl/detail/impl/openssl_init.ipp | 145 - .../asio-1.10.2/include/asio/ssl/detail/io.hpp | 347 - .../include/asio/ssl/detail/openssl_init.hpp | 101 - .../include/asio/ssl/detail/openssl_types.hpp | 28 - .../asio/ssl/detail/password_callback.hpp | 72 - .../include/asio/ssl/detail/read_op.hpp | 73 - .../include/asio/ssl/detail/shutdown_op.hpp | 60 - .../include/asio/ssl/detail/stream_core.hpp | 126 - .../include/asio/ssl/detail/verify_callback.hpp | 68 - .../include/asio/ssl/detail/write_op.hpp | 73 - .../asio-1.10.2/include/asio/ssl/error.hpp | 68 - .../include/asio/ssl/impl/context.hpp | 71 - .../include/asio/ssl/impl/context.ipp | 950 - .../asio-1.10.2/include/asio/ssl/impl/error.ipp | 57 - .../asio/ssl/impl/rfc2818_verification.ipp | 166 - .../asio-1.10.2/include/asio/ssl/impl/src.hpp | 28 - .../include/asio/ssl/old/basic_context.hpp | 434 - .../include/asio/ssl/old/context_service.hpp | 174 - .../ssl/old/detail/openssl_context_service.hpp | 386 - .../asio/ssl/old/detail/openssl_operation.hpp | 524 - .../ssl/old/detail/openssl_stream_service.hpp | 571 - .../asio-1.10.2/include/asio/ssl/old/stream.hpp | 501 - .../include/asio/ssl/old/stream_service.hpp | 184 - .../include/asio/ssl/rfc2818_verification.hpp | 100 - .../asio-1.10.2/include/asio/ssl/stream.hpp | 756 - .../include/asio/ssl/stream_base.hpp | 52 - .../include/asio/ssl/stream_service.hpp | 40 - .../include/asio/ssl/verify_context.hpp | 73 - .../include/asio/ssl/verify_mode.hpp | 63 - .../asio-1.10.2/include/asio/steady_timer.hpp | 61 - .../asio-1.10.2/include/asio/strand.hpp | 251 - .../include/asio/stream_socket_service.hpp | 376 - .../asio-1.10.2/include/asio/streambuf.hpp | 33 - .../asio-1.10.2/include/asio/system_error.hpp | 131 - .../asio-1.10.2/include/asio/system_timer.hpp | 57 - .../asio-1.10.2/include/asio/thread.hpp | 92 - .../asio-1.10.2/include/asio/time_traits.hpp | 96 - .../asio-1.10.2/include/asio/unyield.hpp | 21 - .../asio-1.10.2/include/asio/use_future.hpp | 92 - .../asio-1.10.2/include/asio/version.hpp | 23 - .../asio-1.10.2/include/asio/wait_traits.hpp | 41 - .../include/asio/waitable_timer_service.hpp | 168 - .../include/asio/windows/basic_handle.hpp | 281 - .../asio/windows/basic_object_handle.hpp | 178 - .../asio/windows/basic_random_access_handle.hpp | 376 - .../asio/windows/basic_stream_handle.hpp | 359 - .../include/asio/windows/object_handle.hpp | 38 - .../asio/windows/object_handle_service.hpp | 177 - .../include/asio/windows/overlapped_ptr.hpp | 116 - .../asio/windows/random_access_handle.hpp | 37 - .../windows/random_access_handle_service.hpp | 220 - .../include/asio/windows/stream_handle.hpp | 37 - .../asio/windows/stream_handle_service.hpp | 218 - .../asio-1.10.2/include/asio/write.hpp | 618 - .../asio-1.10.2/include/asio/write_at.hpp | 670 - .../asio-1.10.2/include/asio/yield.hpp | 23 - .../third_party/asio-1.10.2/src/asio.cpp | 11 - .../third_party/asio-1.10.2/src/asio_ssl.cpp | 11 - .../third_party/gmock-1.7.0/CMakeLists.txt | 2 - .../libhdfspp/third_party/gmock-1.7.0/LICENSE | 28 - .../third_party/gmock-1.7.0/gmock-gtest-all.cc | 11443 ---------- .../third_party/gmock-1.7.0/gmock/gmock.h | 14198 ------------ .../third_party/gmock-1.7.0/gmock_main.cc | 54 - .../third_party/gmock-1.7.0/gtest/gtest.h | 20061 ----------------- .../src/CMakeLists.txt | 1 + .../src/main/native/libhdfspp/CMakeLists.txt | 62 + .../src/main/native/libhdfspp/doc/Doxyfile.in | 17 + .../src/main/native/libhdfspp/doc/mainpage.dox | 8 + .../native/libhdfspp/include/libhdfspp/hdfs.h | 108 + .../libhdfspp/include/libhdfspp/options.h | 35 + .../native/libhdfspp/include/libhdfspp/status.h | 98 + .../main/native/libhdfspp/lib/CMakeLists.txt | 23 + .../native/libhdfspp/lib/common/CMakeLists.txt | 1 + .../main/native/libhdfspp/lib/common/base64.cc | 71 + .../libhdfspp/lib/common/continuation/asio.h | 144 + .../lib/common/continuation/continuation.h | 138 + .../lib/common/continuation/protobuf.h | 130 + .../libhdfspp/lib/common/hdfs_public_api.cc | 29 + .../libhdfspp/lib/common/hdfs_public_api.h | 42 + .../main/native/libhdfspp/lib/common/logging.h | 61 + .../main/native/libhdfspp/lib/common/options.cc | 27 + .../libhdfspp/lib/common/sasl_authenticator.h | 66 + .../libhdfspp/lib/common/sasl_digest_md5.cc | 240 + .../main/native/libhdfspp/lib/common/status.cc | 66 + .../src/main/native/libhdfspp/lib/common/util.h | 58 + .../main/native/libhdfspp/lib/fs/CMakeLists.txt | 2 + .../main/native/libhdfspp/lib/fs/filesystem.cc | 106 + .../main/native/libhdfspp/lib/fs/filesystem.h | 78 + .../main/native/libhdfspp/lib/fs/inputstream.cc | 46 + .../native/libhdfspp/lib/fs/inputstream_impl.h | 193 + .../native/libhdfspp/lib/proto/CMakeLists.txt | 64 + .../native/libhdfspp/lib/proto/cpp_helpers.h | 82 + .../libhdfspp/lib/proto/protoc_gen_hrpc.cc | 95 + .../native/libhdfspp/lib/reader/CMakeLists.txt | 20 + .../native/libhdfspp/lib/reader/block_reader.h | 114 + .../native/libhdfspp/lib/reader/datatransfer.cc | 52 + .../native/libhdfspp/lib/reader/datatransfer.h | 63 + .../libhdfspp/lib/reader/datatransfer_impl.h | 144 + .../libhdfspp/lib/reader/remote_block_reader.cc | 46 + .../lib/reader/remote_block_reader_impl.h | 342 + .../native/libhdfspp/lib/rpc/CMakeLists.txt | 3 + .../native/libhdfspp/lib/rpc/rpc_connection.cc | 270 + .../native/libhdfspp/lib/rpc/rpc_connection.h | 158 + .../main/native/libhdfspp/lib/rpc/rpc_engine.cc | 97 + .../main/native/libhdfspp/lib/rpc/rpc_engine.h | 172 + .../main/native/libhdfspp/tests/CMakeLists.txt | 43 + .../native/libhdfspp/tests/inputstream_test.cc | 227 + .../native/libhdfspp/tests/mock_connection.cc | 29 + .../native/libhdfspp/tests/mock_connection.h | 69 + .../libhdfspp/tests/remote_block_reader_test.cc | 283 + .../native/libhdfspp/tests/rpc_engine_test.cc | 179 + .../libhdfspp/tests/sasl_digest_md5_test.cc | 44 + .../libhdfspp/third_party/asio-1.10.2/COPYING | 4 + .../third_party/asio-1.10.2/include/asio.hpp | 122 + .../asio-1.10.2/include/asio/async_result.hpp | 94 + .../include/asio/basic_datagram_socket.hpp | 949 + .../include/asio/basic_deadline_timer.hpp | 520 + .../include/asio/basic_io_object.hpp | 240 + .../include/asio/basic_raw_socket.hpp | 940 + .../include/asio/basic_seq_packet_socket.hpp | 565 + .../include/asio/basic_serial_port.hpp | 695 + .../include/asio/basic_signal_set.hpp | 384 + .../asio-1.10.2/include/asio/basic_socket.hpp | 1518 ++ .../include/asio/basic_socket_acceptor.hpp | 1136 + .../include/asio/basic_socket_iostream.hpp | 286 + .../include/asio/basic_socket_streambuf.hpp | 567 + .../include/asio/basic_stream_socket.hpp | 852 + .../include/asio/basic_streambuf.hpp | 369 + .../include/asio/basic_streambuf_fwd.hpp | 33 + .../include/asio/basic_waitable_timer.hpp | 519 + .../asio-1.10.2/include/asio/buffer.hpp | 2239 ++ .../include/asio/buffered_read_stream.hpp | 244 + .../include/asio/buffered_read_stream_fwd.hpp | 25 + .../include/asio/buffered_stream.hpp | 258 + .../include/asio/buffered_stream_fwd.hpp | 25 + .../include/asio/buffered_write_stream.hpp | 236 + .../include/asio/buffered_write_stream_fwd.hpp | 25 + .../include/asio/buffers_iterator.hpp | 481 + .../include/asio/completion_condition.hpp | 218 + .../asio-1.10.2/include/asio/connect.hpp | 823 + .../asio-1.10.2/include/asio/coroutine.hpp | 328 + .../include/asio/datagram_socket_service.hpp | 432 + .../asio-1.10.2/include/asio/deadline_timer.hpp | 63 + .../include/asio/deadline_timer_service.hpp | 173 + .../include/asio/detail/addressof.hpp | 38 + .../asio-1.10.2/include/asio/detail/array.hpp | 38 + .../include/asio/detail/array_fwd.hpp | 34 + .../asio-1.10.2/include/asio/detail/assert.hpp | 32 + .../include/asio/detail/atomic_count.hpp | 45 + .../asio/detail/base_from_completion_cond.hpp | 68 + .../include/asio/detail/bind_handler.hpp | 489 + .../include/asio/detail/buffer_resize_guard.hpp | 66 + .../asio/detail/buffer_sequence_adapter.hpp | 383 + .../asio/detail/buffered_stream_storage.hpp | 126 + .../include/asio/detail/call_stack.hpp | 125 + .../include/asio/detail/chrono_time_traits.hpp | 190 + .../include/asio/detail/completion_handler.hpp | 81 + .../asio-1.10.2/include/asio/detail/config.hpp | 895 + .../include/asio/detail/consuming_buffers.hpp | 292 + .../asio-1.10.2/include/asio/detail/cstdint.hpp | 46 + .../include/asio/detail/date_time_fwd.hpp | 34 + .../asio/detail/deadline_timer_service.hpp | 227 + .../include/asio/detail/dependent_type.hpp | 36 + .../include/asio/detail/descriptor_ops.hpp | 117 + .../include/asio/detail/descriptor_read_op.hpp | 119 + .../include/asio/detail/descriptor_write_op.hpp | 119 + .../include/asio/detail/dev_poll_reactor.hpp | 210 + .../include/asio/detail/epoll_reactor.hpp | 242 + .../asio-1.10.2/include/asio/detail/event.hpp | 48 + .../asio/detail/eventfd_select_interrupter.hpp | 83 + .../include/asio/detail/fd_set_adapter.hpp | 39 + .../include/asio/detail/fenced_block.hpp | 76 + .../include/asio/detail/function.hpp | 38 + .../asio/detail/gcc_arm_fenced_block.hpp | 89 + .../asio/detail/gcc_hppa_fenced_block.hpp | 66 + .../asio/detail/gcc_sync_fenced_block.hpp | 63 + .../asio/detail/gcc_x86_fenced_block.hpp | 89 + .../asio/detail/handler_alloc_helpers.hpp | 82 + .../asio/detail/handler_cont_helpers.hpp | 45 + .../asio/detail/handler_invoke_helpers.hpp | 57 + .../include/asio/detail/handler_tracking.hpp | 159 + .../asio/detail/handler_type_requirements.hpp | 488 + .../include/asio/detail/hash_map.hpp | 331 + .../detail/impl/buffer_sequence_adapter.ipp | 118 + .../include/asio/detail/impl/descriptor_ops.ipp | 451 + .../asio/detail/impl/dev_poll_reactor.hpp | 78 + .../asio/detail/impl/dev_poll_reactor.ipp | 445 + .../include/asio/detail/impl/epoll_reactor.hpp | 76 + .../include/asio/detail/impl/epoll_reactor.ipp | 662 + .../detail/impl/eventfd_select_interrupter.ipp | 165 + .../asio/detail/impl/handler_tracking.ipp | 305 + .../include/asio/detail/impl/kqueue_reactor.hpp | 80 + .../include/asio/detail/impl/kqueue_reactor.ipp | 463 + .../detail/impl/pipe_select_interrupter.ipp | 124 + .../include/asio/detail/impl/posix_event.ipp | 47 + .../include/asio/detail/impl/posix_mutex.ipp | 46 + .../include/asio/detail/impl/posix_thread.ipp | 74 + .../include/asio/detail/impl/posix_tss_ptr.ipp | 46 + .../detail/impl/reactive_descriptor_service.ipp | 208 + .../impl/reactive_serial_port_service.ipp | 151 + .../impl/reactive_socket_service_base.ipp | 267 + .../asio/detail/impl/resolver_service_base.ipp | 130 + .../include/asio/detail/impl/select_reactor.hpp | 87 + .../include/asio/detail/impl/select_reactor.ipp | 313 + .../asio/detail/impl/service_registry.hpp | 88 + .../asio/detail/impl/service_registry.ipp | 188 + .../asio/detail/impl/signal_set_service.ipp | 647 + .../include/asio/detail/impl/socket_ops.ipp | 3394 +++ .../detail/impl/socket_select_interrupter.ipp | 175 + .../include/asio/detail/impl/strand_service.hpp | 118 + .../include/asio/detail/impl/strand_service.ipp | 176 + .../asio/detail/impl/task_io_service.hpp | 78 + .../asio/detail/impl/task_io_service.ipp | 474 + .../include/asio/detail/impl/throw_error.ipp | 60 + .../asio/detail/impl/timer_queue_ptime.ipp | 84 + .../asio/detail/impl/timer_queue_set.ipp | 101 + .../include/asio/detail/impl/win_event.ipp | 67 + .../detail/impl/win_iocp_handle_service.ipp | 528 + .../asio/detail/impl/win_iocp_io_service.hpp | 130 + .../asio/detail/impl/win_iocp_io_service.ipp | 531 + .../impl/win_iocp_serial_port_service.ipp | 180 + .../impl/win_iocp_socket_service_base.ipp | 728 + .../include/asio/detail/impl/win_mutex.ipp | 78 + .../detail/impl/win_object_handle_service.ipp | 444 + .../asio/detail/impl/win_static_mutex.ipp | 118 + .../include/asio/detail/impl/win_thread.ipp | 139 + .../include/asio/detail/impl/win_tss_ptr.ipp | 57 + .../detail/impl/winrt_ssocket_service_base.ipp | 612 + .../asio/detail/impl/winrt_timer_scheduler.hpp | 79 + .../asio/detail/impl/winrt_timer_scheduler.ipp | 122 + .../include/asio/detail/impl/winsock_init.ipp | 82 + .../include/asio/detail/io_control.hpp | 134 + .../include/asio/detail/keyword_tss_ptr.hpp | 70 + .../include/asio/detail/kqueue_reactor.hpp | 219 + .../asio-1.10.2/include/asio/detail/limits.hpp | 26 + .../asio/detail/local_free_on_block_exit.hpp | 57 + .../include/asio/detail/macos_fenced_block.hpp | 61 + .../asio-1.10.2/include/asio/detail/mutex.hpp | 48 + .../include/asio/detail/noncopyable.hpp | 43 + .../include/asio/detail/null_event.hpp | 88 + .../include/asio/detail/null_fenced_block.hpp | 45 + .../include/asio/detail/null_mutex.hpp | 64 + .../include/asio/detail/null_reactor.hpp | 67 + .../include/asio/detail/null_signal_blocker.hpp | 69 + .../include/asio/detail/null_socket_service.hpp | 497 + .../include/asio/detail/null_static_mutex.hpp | 60 + .../include/asio/detail/null_thread.hpp | 61 + .../include/asio/detail/null_tss_ptr.hpp | 68 + .../include/asio/detail/object_pool.hpp | 146 + .../include/asio/detail/old_win_sdk_compat.hpp | 214 + .../include/asio/detail/op_queue.hpp | 156 + .../include/asio/detail/operation.hpp | 38 + .../asio/detail/pipe_select_interrupter.hpp | 89 + .../include/asio/detail/pop_options.hpp | 105 + .../include/asio/detail/posix_event.hpp | 126 + .../asio/detail/posix_fd_set_adapter.hpp | 118 + .../include/asio/detail/posix_mutex.hpp | 76 + .../asio/detail/posix_signal_blocker.hpp | 85 + .../include/asio/detail/posix_static_mutex.hpp | 64 + .../include/asio/detail/posix_thread.hpp | 105 + .../include/asio/detail/posix_tss_ptr.hpp | 79 + .../include/asio/detail/push_options.hpp | 138 + .../asio/detail/reactive_descriptor_service.hpp | 322 + .../asio/detail/reactive_null_buffers_op.hpp | 88 + .../detail/reactive_serial_port_service.hpp | 234 + .../asio/detail/reactive_socket_accept_op.hpp | 136 + .../asio/detail/reactive_socket_connect_op.hpp | 106 + .../asio/detail/reactive_socket_recv_op.hpp | 123 + .../asio/detail/reactive_socket_recvfrom_op.hpp | 133 + .../asio/detail/reactive_socket_recvmsg_op.hpp | 125 + .../asio/detail/reactive_socket_send_op.hpp | 120 + .../asio/detail/reactive_socket_sendto_op.hpp | 123 + .../asio/detail/reactive_socket_service.hpp | 457 + .../detail/reactive_socket_service_base.hpp | 450 + .../asio-1.10.2/include/asio/detail/reactor.hpp | 32 + .../include/asio/detail/reactor_fwd.hpp | 40 + .../include/asio/detail/reactor_op.hpp | 61 + .../include/asio/detail/reactor_op_queue.hpp | 168 + .../include/asio/detail/regex_fwd.hpp | 35 + .../include/asio/detail/resolve_endpoint_op.hpp | 121 + .../include/asio/detail/resolve_op.hpp | 131 + .../include/asio/detail/resolver_service.hpp | 129 + .../asio/detail/resolver_service_base.hpp | 129 + .../include/asio/detail/scoped_lock.hpp | 101 + .../include/asio/detail/scoped_ptr.hpp | 79 + .../include/asio/detail/select_interrupter.hpp | 46 + .../include/asio/detail/select_reactor.hpp | 219 + .../include/asio/detail/service_registry.hpp | 156 + .../include/asio/detail/shared_ptr.hpp | 38 + .../include/asio/detail/signal_blocker.hpp | 44 + .../include/asio/detail/signal_handler.hpp | 82 + .../include/asio/detail/signal_init.hpp | 47 + .../include/asio/detail/signal_op.hpp | 49 + .../include/asio/detail/signal_set_service.hpp | 216 + .../include/asio/detail/socket_holder.hpp | 98 + .../include/asio/detail/socket_ops.hpp | 334 + .../include/asio/detail/socket_option.hpp | 316 + .../asio/detail/socket_select_interrupter.hpp | 91 + .../include/asio/detail/socket_types.hpp | 404 + .../asio/detail/solaris_fenced_block.hpp | 61 + .../include/asio/detail/static_mutex.hpp | 52 + .../include/asio/detail/std_event.hpp | 176 + .../include/asio/detail/std_mutex.hpp | 73 + .../include/asio/detail/std_static_mutex.hpp | 81 + .../include/asio/detail/std_thread.hpp | 65 + .../include/asio/detail/strand_service.hpp | 142 + .../include/asio/detail/task_io_service.hpp | 201 + .../asio/detail/task_io_service_operation.hpp | 76 + .../asio/detail/task_io_service_thread_info.hpp | 40 + .../asio-1.10.2/include/asio/detail/thread.hpp | 56 + .../include/asio/detail/thread_info_base.hpp | 91 + .../include/asio/detail/throw_error.hpp | 53 + .../include/asio/detail/throw_exception.hpp | 51 + .../include/asio/detail/timer_queue.hpp | 332 + .../include/asio/detail/timer_queue_base.hpp | 68 + .../include/asio/detail/timer_queue_ptime.hpp | 93 + .../include/asio/detail/timer_queue_set.hpp | 66 + .../include/asio/detail/timer_scheduler.hpp | 35 + .../include/asio/detail/timer_scheduler_fwd.hpp | 40 + .../asio-1.10.2/include/asio/detail/tss_ptr.hpp | 69 + .../include/asio/detail/type_traits.hpp | 58 + .../include/asio/detail/variadic_templates.hpp | 63 + .../include/asio/detail/wait_handler.hpp | 83 + .../asio-1.10.2/include/asio/detail/wait_op.hpp | 45 + .../include/asio/detail/weak_ptr.hpp | 38 + .../include/asio/detail/win_event.hpp | 126 + .../include/asio/detail/win_fd_set_adapter.hpp | 149 + .../include/asio/detail/win_fenced_block.hpp | 89 + .../asio/detail/win_iocp_handle_read_op.hpp | 109 + .../asio/detail/win_iocp_handle_service.hpp | 322 + .../asio/detail/win_iocp_handle_write_op.hpp | 101 + .../include/asio/detail/win_iocp_io_service.hpp | 315 + .../asio/detail/win_iocp_null_buffers_op.hpp | 119 + .../include/asio/detail/win_iocp_operation.hpp | 95 + .../asio/detail/win_iocp_overlapped_op.hpp | 88 + .../asio/detail/win_iocp_overlapped_ptr.hpp | 144 + .../detail/win_iocp_serial_port_service.hpp | 228 + .../asio/detail/win_iocp_socket_accept_op.hpp | 165 + .../asio/detail/win_iocp_socket_connect_op.hpp | 124 + .../asio/detail/win_iocp_socket_recv_op.hpp | 115 + .../asio/detail/win_iocp_socket_recvfrom_op.hpp | 123 + .../asio/detail/win_iocp_socket_recvmsg_op.hpp | 116 + .../asio/detail/win_iocp_socket_send_op.hpp | 109 + .../asio/detail/win_iocp_socket_service.hpp | 525 + .../detail/win_iocp_socket_service_base.hpp | 524 + .../asio/detail/win_iocp_thread_info.hpp | 34 + .../include/asio/detail/win_mutex.hpp | 78 + .../asio/detail/win_object_handle_service.hpp | 183 + .../include/asio/detail/win_static_mutex.hpp | 74 + .../include/asio/detail/win_thread.hpp | 139 + .../include/asio/detail/win_tss_ptr.hpp | 79 + .../include/asio/detail/wince_thread.hpp | 116 + .../include/asio/detail/winrt_async_manager.hpp | 294 + .../include/asio/detail/winrt_async_op.hpp | 65 + .../include/asio/detail/winrt_resolve_op.hpp | 117 + .../asio/detail/winrt_resolver_service.hpp | 183 + .../asio/detail/winrt_socket_connect_op.hpp | 90 + .../asio/detail/winrt_socket_recv_op.hpp | 110 + .../asio/detail/winrt_socket_send_op.hpp | 101 + .../asio/detail/winrt_ssocket_service.hpp | 232 + .../asio/detail/winrt_ssocket_service_base.hpp | 355 + .../asio/detail/winrt_timer_scheduler.hpp | 131 + .../include/asio/detail/winrt_utils.hpp | 106 + .../include/asio/detail/winsock_init.hpp | 128 + .../include/asio/detail/wrapped_handler.hpp | 291 + .../asio-1.10.2/include/asio/error.hpp | 331 + .../asio-1.10.2/include/asio/error_code.hpp | 188 + .../include/asio/generic/basic_endpoint.hpp | 193 + .../include/asio/generic/datagram_protocol.hpp | 123 + .../include/asio/generic/detail/endpoint.hpp | 133 + .../asio/generic/detail/impl/endpoint.ipp | 109 + .../include/asio/generic/raw_protocol.hpp | 121 + .../asio/generic/seq_packet_protocol.hpp | 122 + .../include/asio/generic/stream_protocol.hpp | 127 + .../include/asio/handler_alloc_hook.hpp | 81 + .../include/asio/handler_continuation_hook.hpp | 54 + .../include/asio/handler_invoke_hook.hpp | 85 + .../asio-1.10.2/include/asio/handler_type.hpp | 112 + .../include/asio/high_resolution_timer.hpp | 63 + .../include/asio/impl/buffered_read_stream.hpp | 358 + .../include/asio/impl/buffered_write_stream.hpp | 338 + .../asio-1.10.2/include/asio/impl/connect.hpp | 428 + .../asio-1.10.2/include/asio/impl/error.ipp | 128 + .../include/asio/impl/error_code.ipp | 128 + .../include/asio/impl/handler_alloc_hook.ipp | 77 + .../include/asio/impl/io_service.hpp | 152 + .../include/asio/impl/io_service.ipp | 155 + .../asio-1.10.2/include/asio/impl/read.hpp | 753 + .../asio-1.10.2/include/asio/impl/read_at.hpp | 810 + .../include/asio/impl/read_until.hpp | 1147 + .../include/asio/impl/serial_port_base.hpp | 59 + .../include/asio/impl/serial_port_base.ipp | 554 + .../asio-1.10.2/include/asio/impl/spawn.hpp | 336 + .../asio-1.10.2/include/asio/impl/src.cpp | 25 + .../asio-1.10.2/include/asio/impl/src.hpp | 74 + .../include/asio/impl/use_future.hpp | 172 + .../asio-1.10.2/include/asio/impl/write.hpp | 765 + .../asio-1.10.2/include/asio/impl/write_at.hpp | 825 + .../asio-1.10.2/include/asio/io_service.hpp | 770 + .../asio-1.10.2/include/asio/ip/address.hpp | 200 + .../asio-1.10.2/include/asio/ip/address_v4.hpp | 241 + .../asio-1.10.2/include/asio/ip/address_v6.hpp | 246 + .../include/asio/ip/basic_endpoint.hpp | 263 + .../include/asio/ip/basic_resolver.hpp | 268 + .../include/asio/ip/basic_resolver_entry.hpp | 94 + .../include/asio/ip/basic_resolver_iterator.hpp | 260 + .../include/asio/ip/basic_resolver_query.hpp | 244 + .../include/asio/ip/detail/endpoint.hpp | 139 + .../include/asio/ip/detail/impl/endpoint.ipp | 204 + .../include/asio/ip/detail/socket_option.hpp | 569 + .../asio-1.10.2/include/asio/ip/host_name.hpp | 42 + .../asio-1.10.2/include/asio/ip/icmp.hpp | 115 + .../include/asio/ip/impl/address.hpp | 53 + .../include/asio/ip/impl/address.ipp | 226 + .../include/asio/ip/impl/address_v4.hpp | 53 + .../include/asio/ip/impl/address_v4.ipp | 178 + .../include/asio/ip/impl/address_v6.hpp | 53 + .../include/asio/ip/impl/address_v6.ipp | 298 + .../include/asio/ip/impl/basic_endpoint.hpp | 55 + .../include/asio/ip/impl/host_name.ipp | 54 + .../asio-1.10.2/include/asio/ip/multicast.hpp | 191 + .../include/asio/ip/resolver_query_base.hpp | 130 + .../include/asio/ip/resolver_service.hpp | 176 + .../asio-1.10.2/include/asio/ip/tcp.hpp | 155 + .../asio-1.10.2/include/asio/ip/udp.hpp | 111 + .../asio-1.10.2/include/asio/ip/unicast.hpp | 70 + .../asio-1.10.2/include/asio/ip/v6_only.hpp | 69 + .../include/asio/is_read_buffered.hpp | 59 + .../include/asio/is_write_buffered.hpp | 59 + .../include/asio/local/basic_endpoint.hpp | 239 + .../include/asio/local/connect_pair.hpp | 104 + .../include/asio/local/datagram_protocol.hpp | 80 + .../include/asio/local/detail/endpoint.hpp | 133 + .../include/asio/local/detail/impl/endpoint.ipp | 128 + .../include/asio/local/stream_protocol.hpp | 90 + .../asio-1.10.2/include/asio/placeholders.hpp | 123 + .../include/asio/posix/basic_descriptor.hpp | 490 + .../asio/posix/basic_stream_descriptor.hpp | 362 + .../include/asio/posix/descriptor_base.hpp | 97 + .../include/asio/posix/stream_descriptor.hpp | 37 + .../asio/posix/stream_descriptor_service.hpp | 260 + .../include/asio/raw_socket_service.hpp | 432 + .../asio-1.10.2/include/asio/read.hpp | 631 + .../asio-1.10.2/include/asio/read_at.hpp | 664 + .../asio-1.10.2/include/asio/read_until.hpp | 923 + .../include/asio/seq_packet_socket_service.hpp | 380 + .../asio-1.10.2/include/asio/serial_port.hpp | 36 + .../include/asio/serial_port_base.hpp | 167 + .../include/asio/serial_port_service.hpp | 253 + .../asio-1.10.2/include/asio/signal_set.hpp | 28 + .../include/asio/signal_set_service.hpp | 134 + .../include/asio/socket_acceptor_service.hpp | 302 + .../asio-1.10.2/include/asio/socket_base.hpp | 520 + .../asio-1.10.2/include/asio/spawn.hpp | 265 + .../asio-1.10.2/include/asio/ssl.hpp | 30 + .../include/asio/ssl/basic_context.hpp | 40 + .../asio-1.10.2/include/asio/ssl/context.hpp | 787 + .../include/asio/ssl/context_base.hpp | 167 + .../include/asio/ssl/context_service.hpp | 40 + .../asio/ssl/detail/buffered_handshake_op.hpp | 110 + .../include/asio/ssl/detail/engine.hpp | 164 + .../include/asio/ssl/detail/handshake_op.hpp | 68 + .../include/asio/ssl/detail/impl/engine.ipp | 326 + .../asio/ssl/detail/impl/openssl_init.ipp | 145 + .../asio-1.10.2/include/asio/ssl/detail/io.hpp | 347 + .../include/asio/ssl/detail/openssl_init.hpp | 101 + .../include/asio/ssl/detail/openssl_types.hpp | 28 + .../asio/ssl/detail/password_callback.hpp | 72 + .../include/asio/ssl/detail/read_op.hpp | 73 + .../include/asio/ssl/detail/shutdown_op.hpp | 60 + .../include/asio/ssl/detail/stream_core.hpp | 126 + .../include/asio/ssl/detail/verify_callback.hpp | 68 + .../include/asio/ssl/detail/write_op.hpp | 73 + .../asio-1.10.2/include/asio/ssl/error.hpp | 68 + .../include/asio/ssl/impl/context.hpp | 71 + .../include/asio/ssl/impl/context.ipp | 950 + .../asio-1.10.2/include/asio/ssl/impl/error.ipp | 57 + .../asio/ssl/impl/rfc2818_verification.ipp | 166 + .../asio-1.10.2/include/asio/ssl/impl/src.hpp | 28 + .../include/asio/ssl/old/basic_context.hpp | 434 + .../include/asio/ssl/old/context_service.hpp | 174 + .../ssl/old/detail/openssl_context_service.hpp | 386 + .../asio/ssl/old/detail/openssl_operation.hpp | 524 + .../ssl/old/detail/openssl_stream_service.hpp | 571 + .../asio-1.10.2/include/asio/ssl/old/stream.hpp | 501 + .../include/asio/ssl/old/stream_service.hpp | 184 + .../include/asio/ssl/rfc2818_verification.hpp | 100 + .../asio-1.10.2/include/asio/ssl/stream.hpp | 756 + .../include/asio/ssl/stream_base.hpp | 52 + .../include/asio/ssl/stream_service.hpp | 40 + .../include/asio/ssl/verify_context.hpp | 73 + .../include/asio/ssl/verify_mode.hpp | 63 + .../asio-1.10.2/include/asio/steady_timer.hpp | 61 + .../asio-1.10.2/include/asio/strand.hpp | 251 + .../include/asio/stream_socket_service.hpp | 376 + .../asio-1.10.2/include/asio/streambuf.hpp | 33 + .../asio-1.10.2/include/asio/system_error.hpp | 131 + .../asio-1.10.2/include/asio/system_timer.hpp | 57 + .../asio-1.10.2/include/asio/thread.hpp | 92 + .../asio-1.10.2/include/asio/time_traits.hpp | 96 + .../asio-1.10.2/include/asio/unyield.hpp | 21 + .../asio-1.10.2/include/asio/use_future.hpp | 92 + .../asio-1.10.2/include/asio/version.hpp | 23 + .../asio-1.10.2/include/asio/wait_traits.hpp | 41 + .../include/asio/waitable_timer_service.hpp | 168 + .../include/asio/windows/basic_handle.hpp | 281 + .../asio/windows/basic_object_handle.hpp | 178 + .../asio/windows/basic_random_access_handle.hpp | 376 + .../asio/windows/basic_stream_handle.hpp | 359 + .../include/asio/windows/object_handle.hpp | 38 + .../asio/windows/object_handle_service.hpp | 177 + .../include/asio/windows/overlapped_ptr.hpp | 116 + .../asio/windows/random_access_handle.hpp | 37 + .../windows/random_access_handle_service.hpp | 220 + .../include/asio/windows/stream_handle.hpp | 37 + .../asio/windows/stream_handle_service.hpp | 218 + .../asio-1.10.2/include/asio/write.hpp | 618 + .../asio-1.10.2/include/asio/write_at.hpp | 670 + .../asio-1.10.2/include/asio/yield.hpp | 23 + .../third_party/asio-1.10.2/src/asio.cpp | 11 + .../third_party/asio-1.10.2/src/asio_ssl.cpp | 11 + .../third_party/gmock-1.7.0/CMakeLists.txt | 2 + .../libhdfspp/third_party/gmock-1.7.0/LICENSE | 28 + .../third_party/gmock-1.7.0/gmock-gtest-all.cc | 11443 ++++++++++ .../third_party/gmock-1.7.0/gmock/gmock.h | 14198 ++++++++++++ .../third_party/gmock-1.7.0/gmock_main.cc | 54 + .../third_party/gmock-1.7.0/gtest/gtest.h | 20061 +++++++++++++++++ 926 files changed, 137297 insertions(+), 137315 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/4cd3b992/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/CMakeLists.txt deleted file mode 100644 index 309e99f..0000000 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/CMakeLists.txt +++ /dev/null @@ -1,23 +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. -# - -cmake_minimum_required(VERSION 2.8 FATAL_ERROR) - -enable_testing() - -add_subdirectory(libhdfspp) http://git-wip-us.apache.org/repos/asf/hadoop/blob/4cd3b992/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/CMakeLists.txt deleted file mode 100644 index 8063f86..0000000 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/CMakeLists.txt +++ /dev/null @@ -1,59 +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. -# - -project (libhdfspp) - -find_package(Doxygen) -find_package(OpenSSL REQUIRED) -find_package(Protobuf REQUIRED) -find_package(Threads) - -add_definitions(-DASIO_STANDALONE -DASIO_CPP11_DATE_TIME) - -if(UNIX) -set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -std=c++11 -g -fPIC -fno-strict-aliasing") -endif() - -# Mac OS 10.7 and later deprecates most of the methods in OpenSSL. -# Add -Wno-deprecated-declarations to avoid the warnings. -if(APPLE) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -Wno-deprecated-declarations") -endif() - -if(DOXYGEN_FOUND) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile @ONLY) -add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "Generating API documentation with Doxygen" VERBATIM) -endif(DOXYGEN_FOUND) - -include_directories( - include - lib - ${PROJECT_BINARY_DIR}/lib/proto - third_party/asio-1.10.2/include - third_party/gmock-1.7.0 -) - -set(PROTO_HDFS_DIR ${CMAKE_CURRENT_LIST_DIR}/../../proto) -set(PROTO_HADOOP_DIR ${CMAKE_CURRENT_LIST_DIR}/../../../../../../hadoop-common-project/hadoop-common/src/main/proto) -set(PROTO_HADOOP_TEST_DIR ${CMAKE_CURRENT_LIST_DIR}/../../../../../../hadoop-common-project/hadoop-common/src/test/proto) - -add_subdirectory(third_party/gmock-1.7.0) -add_subdirectory(lib) -add_subdirectory(tests) http://git-wip-us.apache.org/repos/asf/hadoop/blob/4cd3b992/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/doc/Doxyfile.in ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/doc/Doxyfile.in b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/doc/Doxyfile.in deleted file mode 100644 index ac1d0fb..0000000 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/doc/Doxyfile.in +++ /dev/null @@ -1,17 +0,0 @@ -DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = "libhdfspp" -OUTPUT_DIRECTORY = doc -TAB_SIZE = 2 -MARKDOWN_SUPPORT = YES -BUILTIN_STL_SUPPORT = YES - - -INPUT = @PROJECT_SOURCE_DIR@/doc/mainpage.dox \ - @PROJECT_SOURCE_DIR@/include/libhdfspp \ - @PROJECT_SOURCE_DIR@/lib/common/continuation \ - -INPUT_ENCODING = UTF-8 -RECURSIVE = NO - -GENERATE_HTML = YES -GENERATE_LATEX = NO http://git-wip-us.apache.org/repos/asf/hadoop/blob/4cd3b992/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/doc/mainpage.dox ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/doc/mainpage.dox b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/doc/mainpage.dox deleted file mode 100644 index ef4ba26..0000000 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/doc/mainpage.dox +++ /dev/null @@ -1,8 +0,0 @@ -/** -\mainpage libhdfs++ - -libhdfs++ is a modern implementation of HDFS client in C++11. It is -optimized for the Massive Parallel Processing (MPP) applications that -access thousands of files concurrently in HDFS. - -*/ http://git-wip-us.apache.org/repos/asf/hadoop/blob/4cd3b992/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/include/libhdfspp/hdfs.h ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/include/libhdfspp/hdfs.h b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/include/libhdfspp/hdfs.h deleted file mode 100644 index a3b1853..0000000 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/include/libhdfspp/hdfs.h +++ /dev/null @@ -1,108 +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 LIBHDFSPP_HDFS_H_ -#define LIBHDFSPP_HDFS_H_ - -#include "libhdfspp/options.h" -#include "libhdfspp/status.h" - -#include <functional> -#include <set> - -namespace hdfs { - -/** - * An IoService manages a queue of asynchronous tasks. All libhdfs++ - * operations are filed against a particular IoService. - * - * When an operation is queued into an IoService, the IoService will - * run the callback handler associated with the operation. Note that - * the IoService must be stopped before destructing the objects that - * file the operations. - * - * From an implementation point of view the IoService object wraps the - * ::asio::io_service objects. Please see the related documentation - * for more details. - **/ -class IoService { -public: - static IoService *New(); - /** - * Run the asynchronous tasks associated with this IoService. - **/ - virtual void Run() = 0; - /** - * Stop running asynchronous tasks associated with this IoService. - **/ - virtual void Stop() = 0; - virtual ~IoService(); -}; - -/** - * Applications opens an InputStream to read files in HDFS. - **/ -class InputStream { -public: - /** - * Read data from a specific position. The current implementation - * stops at the block boundary. - * - * @param buf the pointer to the buffer - * @param nbyte the size of the buffer - * @param offset the offset the file - * @param excluded_datanodes the UUID of the datanodes that should - * not be used in this read - * - * The handler returns the datanode that serves the block and the number of - * bytes has read. - **/ - virtual void - PositionRead(void *buf, size_t nbyte, uint64_t offset, - const std::set<std::string> &excluded_datanodes, - const std::function<void(const Status &, const std::string &, - size_t)> &handler) = 0; - virtual ~InputStream(); -}; - -/** - * FileSystem implements APIs to interact with HDFS. - **/ -class FileSystem { -public: - /** - * Create a new instance of the FileSystem object. The call - * initializes the RPC connections to the NameNode and returns an - * FileSystem object. - **/ - static void - New(IoService *io_service, const Options &options, const std::string &server, - const std::string &service, - const std::function<void(const Status &, FileSystem *)> &handler); - /** - * Open a file on HDFS. The call issues an RPC to the NameNode to - * gather the locations of all blocks in the file and to return a - * new instance of the @ref InputStream object. - **/ - virtual void - Open(const std::string &path, - const std::function<void(const Status &, InputStream *)> &handler) = 0; - virtual ~FileSystem(); -}; -} - -#endif http://git-wip-us.apache.org/repos/asf/hadoop/blob/4cd3b992/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/include/libhdfspp/options.h ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/include/libhdfspp/options.h b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/include/libhdfspp/options.h deleted file mode 100644 index c39d04e..0000000 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/include/libhdfspp/options.h +++ /dev/null @@ -1,35 +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 LIBHDFSPP_OPTIONS_H_ -#define LIBHDFSPP_OPTIONS_H_ - -namespace hdfs { - -/** - * Options to control the behavior of the libhdfspp library. - **/ -struct Options { - /** - * Time out of RPC requests in milliseconds. - * Default: 30000 - **/ - int rpc_timeout; - Options(); -}; -} -#endif http://git-wip-us.apache.org/repos/asf/hadoop/blob/4cd3b992/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/include/libhdfspp/status.h ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/include/libhdfspp/status.h b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/include/libhdfspp/status.h deleted file mode 100644 index fc5ea66..0000000 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/include/libhdfspp/status.h +++ /dev/null @@ -1,98 +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 LIBHDFSPP_STATUS_H_ -#define LIBHDFSPP_STATUS_H_ - -#include <string> -#include <system_error> - -namespace hdfs { - -class StatusHelper; -class Status { - public: - // Create a success status. - Status() : state_(NULL) { } - ~Status() { delete[] state_; } - explicit Status(int code, const char *msg); - - // Copy the specified status. - Status(const Status& s); - void operator=(const Status& s); - - // Return a success status. - static Status OK() { return Status(); } - static Status InvalidArgument(const char *msg) - { return Status(kInvalidArgument, msg); } - static Status ResourceUnavailable(const char *msg) - { return Status(kResourceUnavailable, msg); } - static Status Unimplemented() - { return Status(kUnimplemented, ""); } - static Status Exception(const char *expception_class_name, const char *error_message) - { return Status(kException, expception_class_name, error_message); } - static Status Error(const char *error_message) - { return Exception("Exception", error_message); } - - // Returns true iff the status indicates success. - bool ok() const { return (state_ == NULL); } - - // Return a string representation of this status suitable for printing. - // Returns the string "OK" for success. - std::string ToString() const; - - int code() const { - return (state_ == NULL) ? kOk : static_cast<int>(state_[4]); - } - - private: - // OK status has a NULL state_. Otherwise, state_ is a new[] array - // of the following form: - // state_[0..3] == length of message - // state_[4] == code - // state_[5..] == message - const char* state_; - - enum Code { - kOk = 0, - kInvalidArgument = static_cast<unsigned>(std::errc::invalid_argument), - kResourceUnavailable = static_cast<unsigned>(std::errc::resource_unavailable_try_again), - kUnimplemented = static_cast<unsigned>(std::errc::function_not_supported), - kException = 255, - }; - - explicit Status(int code, const char *msg1, const char *msg2); - static const char *CopyState(const char* s); - static const char *ConstructState(int code, const char *msg1, const char *msg2); -}; - -inline Status::Status(const Status& s) { - state_ = (s.state_ == NULL) ? NULL : CopyState(s.state_); -} - -inline void Status::operator=(const Status& s) { - // The following condition catches both aliasing (when this == &s), - // and the common case where both s and *this are ok. - if (state_ != s.state_) { - delete[] state_; - state_ = (s.state_ == NULL) ? NULL : CopyState(s.state_); - } -} - -} - -#endif http://git-wip-us.apache.org/repos/asf/hadoop/blob/4cd3b992/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/CMakeLists.txt deleted file mode 100644 index a0e3379..0000000 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/CMakeLists.txt +++ /dev/null @@ -1,23 +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. -# - -add_subdirectory(common) -add_subdirectory(fs) -add_subdirectory(reader) -add_subdirectory(rpc) -add_subdirectory(proto) http://git-wip-us.apache.org/repos/asf/hadoop/blob/4cd3b992/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/CMakeLists.txt deleted file mode 100644 index b03f00b..0000000 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_library(common base64.cc options.cc status.cc sasl_digest_md5.cc hdfs_public_api.cc) http://git-wip-us.apache.org/repos/asf/hadoop/blob/4cd3b992/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/base64.cc ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/base64.cc b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/base64.cc deleted file mode 100644 index f98fec5..0000000 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/base64.cc +++ /dev/null @@ -1,71 +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 "util.h" - -#include <array> -#include <functional> -#include <algorithm> - -namespace hdfs { - -std::string Base64Encode(const std::string &src) { - static const char kDictionary[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz" - "0123456789+/"; - - int encoded_size = (src.size() + 2) / 3 * 4; - std::string dst; - dst.reserve(encoded_size); - - size_t i = 0; - while (i + 3 < src.length()) { - const char *s = &src[i]; - const int r[4] = {s[0] >> 2, ((s[0] << 4) | (s[1] >> 4)) & 0x3f, - ((s[1] << 2) | (s[2] >> 6)) & 0x3f, s[2] & 0x3f}; - - std::transform(r, r + sizeof(r) / sizeof(int), std::back_inserter(dst), - [&r](unsigned char v) { return kDictionary[v]; }); - i += 3; - } - - size_t remained = src.length() - i; - const char *s = &src[i]; - - switch (remained) { - case 0: - break; - case 1: { - char padding[4] = {kDictionary[s[0] >> 2], kDictionary[(s[0] << 4) & 0x3f], - '=', '='}; - dst.append(padding, sizeof(padding)); - } break; - case 2: { - char padding[4] = {kDictionary[src[i] >> 2], - kDictionary[((s[0] << 4) | (s[1] >> 4)) & 0x3f], - kDictionary[(s[1] << 2) & 0x3f], '='}; - dst.append(padding, sizeof(padding)); - } break; - default: - assert("Unreachable"); - break; - } - return dst; -} - -} http://git-wip-us.apache.org/repos/asf/hadoop/blob/4cd3b992/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/continuation/asio.h ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/continuation/asio.h b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/continuation/asio.h deleted file mode 100644 index 5630934..0000000 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/continuation/asio.h +++ /dev/null @@ -1,144 +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 LIB_COMMON_CONTINUATION_ASIO_H_ -#define LIB_COMMON_CONTINUATION_ASIO_H_ - -#include "continuation.h" -#include "common/util.h" - -#include "libhdfspp/status.h" - -#include <asio/connect.hpp> -#include <asio/read.hpp> -#include <asio/write.hpp> -#include <asio/ip/tcp.hpp> - -namespace hdfs { -namespace continuation { - -template <class Stream, class MutableBufferSequence> -class ReadContinuation : public Continuation { -public: - ReadContinuation(Stream *stream, const MutableBufferSequence &buffer) - : stream_(stream), buffer_(buffer) {} - virtual void Run(const Next &next) override { - auto handler = - [next](const asio::error_code &ec, size_t) { next(ToStatus(ec)); }; - asio::async_read(*stream_, buffer_, handler); - } - -private: - Stream *stream_; - MutableBufferSequence buffer_; -}; - -template <class Stream, class ConstBufferSequence> -class WriteContinuation : public Continuation { -public: - WriteContinuation(Stream *stream, const ConstBufferSequence &buffer) - : stream_(stream), buffer_(buffer) {} - - virtual void Run(const Next &next) override { - auto handler = - [next](const asio::error_code &ec, size_t) { next(ToStatus(ec)); }; - asio::async_write(*stream_, buffer_, handler); - } - -private: - Stream *stream_; - ConstBufferSequence buffer_; -}; - -template <class Socket, class Iterator> -class ConnectContinuation : public Continuation { -public: - ConnectContinuation(Socket *socket, Iterator begin, Iterator end, - Iterator *connected_endpoint) - : socket_(socket), begin_(begin), end_(end), - connected_endpoint_(connected_endpoint) {} - - virtual void Run(const Next &next) override { - auto handler = [this, next](const asio::error_code &ec, Iterator it) { - if (connected_endpoint_) { - *connected_endpoint_ = it; - } - next(ToStatus(ec)); - }; - asio::async_connect(*socket_, begin_, end_, handler); - } - -private: - Socket *socket_; - Iterator begin_; - Iterator end_; - Iterator *connected_endpoint_; -}; - -template <class OutputIterator> -class ResolveContinuation : public Continuation { -public: - ResolveContinuation(::asio::io_service *io_service, const std::string &server, - const std::string &service, OutputIterator result) - : resolver_(*io_service), query_(server, service), result_(result) {} - - virtual void Run(const Next &next) override { - using resolver = ::asio::ip::tcp::resolver; - auto handler = - [this, next](const asio::error_code &ec, resolver::iterator it) { - if (!ec) { - std::copy(it, resolver::iterator(), result_); - } - next(ToStatus(ec)); - }; - resolver_.async_resolve(query_, handler); - } - -private: - ::asio::ip::tcp::resolver resolver_; - ::asio::ip::tcp::resolver::query query_; - OutputIterator result_; -}; - -template <class Stream, class ConstBufferSequence> -static inline Continuation *Write(Stream *stream, - const ConstBufferSequence &buffer) { - return new WriteContinuation<Stream, ConstBufferSequence>(stream, buffer); -} - -template <class Stream, class MutableBufferSequence> -static inline Continuation *Read(Stream *stream, - const MutableBufferSequence &buffer) { - return new ReadContinuation<Stream, MutableBufferSequence>(stream, buffer); -} - -template <class Socket, class Iterator> -static inline Continuation *Connect(Socket *socket, Iterator begin, - Iterator end) { - return new ConnectContinuation<Socket, Iterator>(socket, begin, end, nullptr); -} - -template <class OutputIterator> -static inline Continuation * -Resolve(::asio::io_service *io_service, const std::string &server, - const std::string &service, OutputIterator result) { - return new ResolveContinuation<OutputIterator>(io_service, server, service, result); -} -} -} - -#endif http://git-wip-us.apache.org/repos/asf/hadoop/blob/4cd3b992/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/continuation/continuation.h ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/continuation/continuation.h b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/continuation/continuation.h deleted file mode 100644 index 0af04a8..0000000 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/lib/common/continuation/continuation.h +++ /dev/null @@ -1,138 +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 LIB_COMMON_CONTINUATION_CONTINUATION_H_ -#define LIB_COMMON_CONTINUATION_CONTINUATION_H_ - -#include "libhdfspp/status.h" - -#include <functional> -#include <memory> -#include <vector> - -namespace hdfs { -namespace continuation { - -class PipelineBase; - -/** - * A continuation is a fragment of runnable code whose execution will - * be scheduled by a \link Pipeline \endlink. - * - * The Continuation class is a build block to implement the - * Continuation Passing Style (CPS) in libhdfs++. In CPS, the - * upper-level user specifies the control flow by chaining a sequence - * of continuations explicitly through the \link Run() \endlink method, - * while in traditional imperative programming the sequences of - * sentences implicitly specify the control flow. - * - * See http://en.wikipedia.org/wiki/Continuation for more details. - **/ -class Continuation { -public: - typedef std::function<void(const Status &)> Next; - virtual ~Continuation() = default; - virtual void Run(const Next &next) = 0; - Continuation(const Continuation &) = delete; - Continuation &operator=(const Continuation &) = delete; - -protected: - Continuation() = default; -}; - -/** - * A pipeline schedules the execution of a chain of \link Continuation - * \endlink. The pipeline schedules the execution of continuations - * based on their order in the pipeline, where the next parameter for - * each continuation points to the \link Schedule() \endlink - * method. That way the pipeline executes all scheduled continuations - * in sequence. - * - * The typical use case of a pipeline is executing continuations - * asynchronously. Note that a continuation calls the next - * continuation when it is finished. If the continuation is posted - * into an asynchronous event loop, invoking the next continuation - * can be done in the callback handler in the asynchronous event loop. - * - * The pipeline allocates the memory as follows. A pipeline is always - * allocated on the heap. It owns all the continuations as well as the - * the state specified by the user. Both the continuations and the - * state have the same life cycle of the pipeline. The design - * simplifies the problem of ensuring that the executions in the - * asynchronous event loop always hold valid pointers w.r.t. the - * pipeline. The pipeline will automatically deallocate itself right - * after it invokes the callback specified the user. - **/ -template <class State> class Pipeline { -public: - typedef std::function<void(const Status &, const State &)> UserHandler; - static Pipeline *Create() { return new Pipeline(); } - Pipeline &Push(Continuation *stage); - void Run(UserHandler &&handler); - State &state() { return state_; } - -private: - State state_; - std::vector<std::unique_ptr<Continuation>> routines_; - size_t stage_; - std::function<void(const Status &, const State &)> handler_; - - Pipeline() : stage_(0) {} - ~Pipeline() = default; - void Schedule(const Status &status); -}; - -template <class State> -inline Pipeline<State> &Pipeline<State>::Push(Continuation *stage) { - routines_.emplace_back(std::unique_ptr<Continuation>(stage)); - return *this; -} - -template <class State> -inline void Pipeline<State>::Schedule(const Status &status) { - if (!status.ok() || stage_ >= routines_.size()) { - handler_(status, state_); - routines_.clear(); - delete this; - } else { - auto next = routines_[stage_].get(); - ++stage_; - next->Run(std::bind(&Pipeline::Schedule, this, std::placeholders::_1)); - } -} - -template <class State> inline void Pipeline<State>::Run(UserHandler &&handler) { - handler_ = std::move(handler); - Schedule(Status::OK()); -} - -template <class Handler> class BindContinuation : public Continuation { -public: - BindContinuation(const Handler &handler) : handler_(handler) {} - virtual void Run(const Next &next) override { handler_(next); } - -private: - Handler handler_; -}; - -template <class Handler> static inline Continuation *Bind(const Handler &handler) { - return new BindContinuation<Handler>(handler); -} -} -} - -#endif
