Commit Graph

53948 Commits

Author SHA1 Message Date
Asias He
61081ce816 streaming: Convert PrepareMessage.java to C++ 2015-06-17 13:37:52 +08:00
Asias He
22346102b7 streaming: Convert FileMessageHeader.java to C++ 2015-06-17 13:37:52 +08:00
Asias He
35ccd02db3 streaming: Convert OutgoingFileMessage.java to C++ 2015-06-17 13:37:52 +08:00
Asias He
edbae6a542 streaming: Convert IncomingFileMessage.java to C++ 2015-06-17 13:37:52 +08:00
Asias He
be31293d61 streaming: Convert CompleteMessage.java to C++ 2015-06-17 13:37:52 +08:00
Asias He
082aeab0a7 streaming: Convert StreamInitMessage.java to C++ 2015-06-17 13:37:52 +08:00
Asias He
15a1d71049 streaming: Convert StreamMessage.java to C++ 2015-06-17 13:37:52 +08:00
Asias He
6393d3d707 streaming: Import StreamInitMessage.java 2015-06-17 13:37:47 +08:00
Asias He
4482c82be9 streaming: Import SessionFailedMessage.java 2015-06-17 12:47:12 +08:00
Asias He
ab373ffa1a streaming: Import RetryMessage.java 2015-06-17 12:46:55 +08:00
Asias He
f2766d86b3 streaming: Import ReceivedMessage.java 2015-06-17 12:46:31 +08:00
Asias He
06cc99d895 streaming: Import PrepareMessage.java 2015-06-17 12:45:44 +08:00
Asias He
96a5e66b62 streaming: Import OutgoingFileMessage.java 2015-06-17 12:45:25 +08:00
Asias He
0cf3d67c35 streaming: Import IncomingFileMessage.java 2015-06-17 12:45:09 +08:00
Asias He
4aad3080ea streaming: Import FileMessageHeader.java 2015-06-17 12:44:44 +08:00
Asias He
4cb06059d9 streaming: Import CompleteMessage.java 2015-06-17 12:44:09 +08:00
Asias He
e2165791f8 streaming: Import StreamMessage.java 2015-06-17 12:43:14 +08:00
Tomasz Grabiec
cf42e4c1a4 core: Fix enable_lw_shared_from_this<T>::shared_from_this() const
Compilation failed when shared_from_this() was called on a const object.

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
2015-06-16 20:32:08 +03:00
Tomasz Grabiec
8efcec1949 core: enable_lw_shared_from_this: Add missing move and copy constructors
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
2015-06-16 20:32:07 +03:00
Shlomi Livne
78f37b25b8 tests: update test.py to use a temporary file for test stdout
When using boost --output-format=XML flag for jenkins the output file is
garbled - it seems that some output is lost. To try and overcome this
changed impl to use a temporay file instead of a PIPE.

Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
2015-06-16 19:38:12 +03:00
Avi Kivity
c357c5b853 Merge "sstable compression support" from Raphael
"only lz4 is supported so far, but other algorithms should be fairly easy to
add, given that the infrastructure for compression is introduced here.

NOTE:
our sstable read code already reads compressed data file, so a test was added
to guarantee that data from a compressed sstable generated by our write code
can be successfully loaded."
2015-06-16 18:54:33 +03:00
Raphael S. Carvalho
3300041f5f tests: add test to sstable compression
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-06-16 12:42:02 -03:00
Raphael S. Carvalho
f17f3b197a sstables: add initial support to compression
lz4 is the unique compressor algorithm supported so far.
missing deflate and snappy algorithms.
Adding them should be relatively easy though.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-06-16 12:42:00 -03:00
Pekka Enberg
24e74f331d cql3: Move create_table_statement::raw_statement implementation
Move raw_statement implementation out of the header file. This makes
life easier when we modify the class for clustering key support.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-06-16 17:35:24 +03:00
Avi Kivity
5bce7b84d0 Merge seastar upstream 2015-06-16 17:12:54 +03:00
Pekka Enberg
194cb68c8b tests: add thread-in-thread test case 2015-06-16 17:11:50 +03:00
Avi Kivity
c477f0e208 thread: remove obsolete FIXME 2015-06-16 17:10:22 +03:00
Avi Kivity
edcd346d83 thread: fix thread-created-within-thread
The thread switching code assumed that we will always switch out of a
thread due to being blocked on an unavailable future.  This allows
the core to store the blocked thread's context in the synthetic
continuation chained to that future (which switched back to that thread).

That assumption failed in one place: when we create a thread from within a
thread.  In that case we switch to the new thread immediately, but forget
all about the old thread.  We never come back to the old thread, and anything
that depends on it hangs.

Fix by creating a linked list of active thread contexts.  These are all
threads that have been "preempted" by the act of creating a new thread,
terminated by the main, unthreaded, reactor context.  This gives us a place
to store those threads and we come back to them and continue where we left
off.

Reported by Pekka.
2015-06-16 17:04:02 +03:00
Raphael S. Carvalho
3bfb86f541 sstables: add compress_max_size to compression
used to return maximum size which compressor may output.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-06-16 09:48:00 -03:00
Avi Kivity
201486ad89 Merge branch 'master' of github.com:cloudius-systems/seastar 2015-06-16 15:37:16 +03:00
Avi Kivity
2e4789ccc3 Merge branch 'master' of github.com:cloudius-systems/urchin into db 2015-06-16 15:35:05 +03:00
Avi Kivity
c209bbfee3 Merge "messaging service API" from Amnon
"This patch series adds counters to the rpc clients then it expose them in the
messaging service with a rest API, it was tested with the messaging_service
test app that was modified to run the API."
2015-06-16 15:23:30 +03:00
Nadav Har'El
78a8ac8470 Make mutation_reader usable outside database.cc
The "mutation_reader" defined in database.cc is a convenient mechanism
for iterating over mutations. It can be useful for more than just
database.cc (I want to use it in the compaction code), so this patch moves
the type's definition to mutation.hh, and the make_memtable_reader()
function to memtable::make_reader() (in memtable.hh).

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-06-16 14:03:34 +02:00
Amnon Heiman
0ffea496ac Adding the http server to the messaging_service test
To test the messaging service API it needs to be included in the
messaging service test.

To test it, start the server with --stay-alive true
then you can use the API to get the messges information:
http://localhost:10001/messaging_service/messages/exception
will return the number of exception per connection
http://localhost:10001/messaging_service/command/completed
will return the number of completed command per connection.

Note that because the two servers are running on the same machine, to
prevent port conflict, the server port will be increment by one (i.e
10001)

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-06-16 14:40:08 +03:00
Amnon Heiman
a928c7422d Add the messaging_service API implementation
This API gother information about messages passing in the system, in
this patch the following API will be supported:

/messaging_service/messages/replied
/messaging_service/messages/sent
/messaging_service/messages/pending
/messaging_service/messages/exception
/messaging_service/messages/respond_pending
/messaging_service/messages/dropped

The swagger defintion can be retrieved from:
/api-doc/messaging_service
2015-06-16 14:40:08 +03:00
Amnon Heiman
25188ed28e API: Adding a helper function to sum a map
In a typical scenario the API collect values from multiple distributed
instances. Sometimes it is needed to reduce multiple maps by merging
their keys and accumulating their values.

This is a helper function that can be used in map_reduce to perform maps
sum.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-06-16 14:40:08 +03:00
Amnon Heiman
04de4382f3 API Doc: Adding the messaging_service swagger definition
This adds the messaging_service API definition it will expose the
messaging_service metrics.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-06-16 14:39:51 +03:00
Amnon Heiman
896f562de7 Adding dropped messages counter to messaging_service
This adds a drop messages counter per verb type to the messaging
service. It will be used by the API to return the number of dropped
messages.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-06-16 14:35:21 +03:00
Amnon Heiman
b236e85961 Add a foreach_client method to the messaging service
The messaging service holds a table of clients which the API needs
information from. This adds a foreach_client method that recieve a
functions and itererate over all the clients calling the given function
on each of them.

This implementation support the current table that holds unique ptr.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-06-16 14:35:21 +03:00
Raphael S. Carvalho
4175fa92b3 sstables: fix lz4 compress
compress_lz4 must account the input length prepended to the output
buffer.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-06-16 08:34:39 -03:00
Raphael S. Carvalho
0c852ec7aa sstables: determine whether compressed is supported by looking at schema
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-06-16 08:34:37 -03:00
Amnon Heiman
9027c4bd33 Adding stub implementation for storage_service
This adds a stub implementation of the storage service, to simplify
future implementation, variables that should be used in the
implementation are taken and stored.

Implementation return the currect type, but with stub values.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-06-16 14:30:23 +03:00
Amnon Heiman
c9fe14c0ff Cleanning the storage_service.cc
This change how values are added to the result array and use std::string
for lexical cast.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-06-16 14:30:23 +03:00
Amnon Heiman
d067b9b111 API: Complete defition of the storage service
This patch complete the definition of the storage service.

It is a mapping of the StorageServiceMBean. When possible the following
convention where used:
API that does not return value will be POST or DELETE depends on the
context.

When possible, POST, DELETE and GET uses the same path

The following commands where added:
get_leaving_nodes
get_moving_nodes
get_joining_nodes
get_release_version
get_schema_version
get_all_data_file_locations
get_saved_caches_location
get_range_to_endpoint_map
get_pending_range_to_endpoint_map
describe_ring_jmx
get_host_id_map
get_load
get_load_map
get_current_generation_number
get_natural_endpoints
get_snapshot_details
take_snapshot
del_snapshot
true_snapshots_size
force_keyspace_compaction
force_keyspace_cleanup
scrub
upgrade_sstables
force_keyspace_flush
repair_async
force_terminate_all_repair_sessions
decommission
move
remove_node
get_removal_status
force_remove_completion
set_logging_level
get_logging_levels
get_operation_mode
is_starting
get_drain_progress
drain
truncate
get_keyspaces
update_snitch
stop_gossiping
start_gossiping
is_gossip_running
stop_daemon
is_initialized
stop_rpc_server
start_rpc_server
is_rpc_server_running
start_native_transport
stop_native_transport
is_native_transport_running
join_ring
is_joined
set_stream_throughput_mb_per_sec
get_stream_throughput_mb_per_sec
get_compaction_throughput_mb_per_sec
set_compaction_throughput_mb_per_sec
is_incremental_backups_enabled
set_incremental_backups_enabled
rebuild
bulk_load
bulk_load_async
reschedule_failed_deletions
load_new_ss_tables
sample_key_range
reset_local_schema
set_trace_probability
get_trace_probability
enable_auto_compaction
disable_auto_compaction
deliver_hints
get_cluster_name
get_partitioner_name
get_tombstone_warn_threshold
set_tombstone_warn_threshold
get_tombstone_failure_threshold
set_tombstone_failure_threshold
get_batch_size_failure_threshold
set_batch_size_failure_threshold
set_hinted_handoff_throttle_in_kb

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-06-16 14:30:09 +03:00
Pekka Enberg
2d9397de58 db/legacy_schema_tables: Store columns to system tables
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-06-16 12:20:20 +02:00
Pekka Enberg
2776b5e657 db/legacy_schema_tables: Add missing attributes in add_table_to_schema_mutation()
Add attributes that we didn't support when the code was first
translated. Please note that we still don't cover all of the so somebody
needs to revisit this later.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-06-16 12:20:20 +02:00
Avi Kivity
5538e234f8 httpd: make 'connection' public again
Some test wants it.
2015-06-16 13:05:01 +03:00
Avi Kivity
2b0650f3f7 Merge branch 'shutdown'
Shutdown support for sockets, and httpd integration.
2015-06-16 12:59:22 +03:00
Avi Kivity
78c2fc27f6 Merge "storage service updates" from Asias 2015-06-16 12:52:45 +03:00
Shlomi Livne
954c697958 dht: Update name of Murmur3Partitioner to align with org.apache.cassandra.dht.Murmur3Partitioner
In sstables the paritioner name is store for validation. To allow Origin
to process our files we need to comply with Origin's paritioner name or
else Origin's SSTableReader::open fails on paritioner comparison.
2015-06-16 12:20:04 +03:00