Commit Graph

29 Commits

Author SHA1 Message Date
Pekka Enberg
94e7e61cd0 api: Register snitch API earlier
Currently, we register snitch API in set_server_gossip_settle() which
waits until a node has joined the cluster. This makes 'nodetool status'
not properly show the status of a joining node. Fix the issue by
registering snitch API earlier.

Fixes #1269.
Message-Id: <1463576381-15484-1-git-send-email-penberg@scylladb.com>
2016-05-20 14:24:14 +03:00
Amnon Heiman
725231a7a0 api: set the api_doc before registering any api
This is a left over from the re ordering of the API init.  The api_doc
should be set first, so later API registration will enable their
relevent swagger doc.

Currently, the swagger documentation of the system API is not available.

Fixes #1160

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1459750490-15996-1-git-send-email-amnon@scylladb.com>
2016-04-04 11:37:59 +03:00
Amnon Heiman
fd94009d0e Fix API init process
The last patch of the API init process had a bug, that the wrong init
function was called.

This solve the issue.

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1453879042-26926-1-git-send-email-amnon@scylladb.com>
2016-01-27 10:03:24 +02:00
Amnon Heiman
b1845cddec Breaking the API initialization into stages
The API needs to be available at an early stage of the initialization,
on the other hand not all the specific APIs are available at that time.

This patch breaks the API initialization into stages, in each stage
additional commands will be available.

While setting that the api header files was broken into api_init.hh that
is relevent to the main and to api.hh which holds the different
api helper functions.

Fixes #754

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1453822331-16729-2-git-send-email-amnon@scylladb.com>
2016-01-26 17:41:31 +02:00
Amnon Heiman
5998ee718a API: Add logger API implementation to the system API
This patch adds the ability to set one or all log levels get a log level
and get all logs name.

After this patch the following url will be available:
GET/POST
/system/logger
/system/logger/{name}

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-10-19 15:05:46 +03:00
Avi Kivity
d5cf0fb2b1 Add license notices 2015-09-20 10:43:39 +03:00
Avi Kivity
53239204f4 Merge "This series adds the stream_manager API." from Amnon
Conflicts:
	api/api.cc
2015-09-10 15:53:58 +03:00
Amnon Heiman
a825977f85 API: return an error for wrong keyspace name
This patch addresses issue #155. It register an exception handler
API of the routes object that handle the no_such_keyspace exception.

The handler just throw a bad_parameter_exception with the error message
it got from the no_such_keyspace exception.

After this patch a call with a keyspace that does not exist, will return
a 400 result.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-09-10 12:53:21 +03:00
Amnon Heiman
ea447dba33 API: Adding the stream_manager API implementation
This adds the implementation for hte stream_manager API.

It goes over all stream, on all shards and combine the result to a
vector of streams.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-09-10 01:03:08 +03:00
Amnon Heiman
c29f53888d API: Take the API doc directory from configuration
The API doc directory will now be taken from configuration instead of
been hard coded.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-09-08 03:08:01 +03:00
Tomasz Grabiec
9a1ee1b96a api: Introduce RESTful API for LSA
To force compaction, invoke:

  $ curl -X POST http://localhost:10000/lsa/compact
2015-08-06 16:50:15 +02:00
Amnon Heiman
3dd694b8c6 API: Adding a stub implementation to the storage_proxy
This adds a stub implementation to the metrics of the storage proxy.
After this patch the following URL will be available:
/storage_service/metrics/cas_write/contention
/storage_service/metrics/cas_write/condition_not_met
/storage_service/metrics/cas_read/unfinished_commit
/storage_service/metrics/cas_read/contention
/storage_service/metrics/cas_read/condition_not_met
/storage_service/metrics/read/timeouts
/storage_service/metrics/read/unavailables
/storage_service/metrics/range/timeouts
/storage_service/metrics/range/unavailables
/storage_service/metrics/write/timeouts
/storage_service/metrics/write/unavailables

The implementation returns 0 for all queries.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-12 14:07:28 +03:00
Avi Kivity
8fa053c7c6 Merge "Adding the hinted_handoff API" from Amnon
"This series adds the hinted handoff and hinted handoff metrics API with a stub
implementation.  The API definition was based on the HintedHandOffMetricsMBean
and the HintedHandoffMetrics."

Conflicts:
	api/api.cc
	configure.py
2015-07-05 17:33:25 +03:00
Avi Kivity
b8f8f66e81 Merge "Adding the endpoint_snitch_api" from Amnon
"This series adds the endpoint snitch api. It is based on the
EndpointSnitchInfoMBean definition."

Conflicts:
	api/api.cc
	configure.py
2015-07-05 17:31:23 +03:00
Amnon Heiman
daceaec74c Adding a stub implementation for the hinted_handoff
This adds a stub implementation for the hinted handoff.
The API returns the currect type but with stubed values.

After applying this patch the api-doc will be available at:
/api-doc/hinted_handoff/

The following url will be available:
/hinted_handoff/hints
/hinted_handoff/schedule
/hinted_handoff/pause

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-05 16:30:30 +03:00
Amnon Heiman
ff4da7fcdc Adding the endpoint_snitch API implementation
This adds the implementation for the API endpoint_snitch
After this patch the API doc can be found at:
/api-doc/endpoint_snitch_info/

The following url are available:
/snitch/datacenter
/snitch/rack

The get name is stubed
/snitch/name

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-02 17:45:23 +03:00
Amnon Heiman
2d04668de5 API: Adding the compaction_manager API stub implementation
This adds a stub implementation for the compaction_manager API.

The methods return the right types but with a stub value.
After this patch the following url will be available:
/compaction_manager/compactions
/compaction_manager/compaction_summary
/compaction_manager/force_user_defined_compaction
/compaction_manager/stop_compaction

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-02 09:46:19 +03:00
Amnon Heiman
aa73311289 adding the collectd implementation
This adds the implementation for:
get_collectd - return a single collectd value
get_collectd_items - list the registerred collectd
2015-06-28 17:37:59 +03:00
Amnon Heiman
72c034abe1 Http API: Add Swagger-UI support
This patch adds support to the Swagger-UI. It does so by adding
reference to the Swagger-UI target directory, after applying this patch
/ui/ will display the Swagger-UI page with the available APIs.

From the Swagger-UI page it is possible to run the different APIs.

The target directory of the ui can be override from the command line.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-06-25 16:41:38 +03:00
Amnon Heiman
4258b005db API: Adding stub implementation for the cache service
This adds a stub implementation for the cache_service. It also register
the API doc.
The cache_service doc will be available at:
http://localhost:10000/api-doc/cache_service/

The stub implementation returns the correct value type with stubbed
values.

After this patch the following path will be available:
/cache_service/row_cache_save_period
/cache_service/key_cache_save_period
/cache_service/counter_cache_save_period
/cache_service/row_cache_keys_to_save
/cache_service/key_cache_keys_to_save
/cache_service/counter_cache_keys_to_save
/cache_service/invalidate_key_cache
/cache_service/invalidate_counter_cache
/cache_service/row_cache_capacity
/cache_service/key_cache_capacity
/cache_service/counter_cache_capacity
/cache_service/save_caches

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-06-24 14:30:08 +03:00
Amnon Heiman
c787fa557e API adding a stub implementation for the storage_proxy
This adds a stub implementation for the storage_proxy.

To simplify future implementation, it takes the passed parameter and
return the correct types with fixed values.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-06-18 11:32:09 +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
2be20ff295 API: Add the column familiy implementation
This adds the API implementation to the column family API.

After this patch the following API will be supported:
/column_family/name
/column_family
/column_family/name/keyspace
2015-06-11 10:12:38 +03:00
Amnon Heiman
ba8365d95a Adding the Failure detector API implementation
This series adds the implementation for teh Failure detector API.
After this patch the following APIs will be supported:
/failure_detector/endpoints
/failure_detector/count/endpoint/up
/failure_detector/count/endpoint/down
/failure_detector/phi
POST:/failure_detector/phi
/failure_detector/simple_states
/failure_detector/endpoints/states

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-06-03 19:13:03 +03:00
Amnon Heiman
f61dcfddc2 Adding the gossiper API implementation
This implement the gossipier API. All actions perform on the local
gossiper.

The following functionality is supported:
/gossiper/downtime/{addr}
/gossiper/generation_number/{addr}
/gossiper/assassinate/{addr}

The following are extened API beyond the MBean definition:
/gossiper/endpoint/down
/gossiper/endpoint/live

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-05-25 18:28:47 +03:00
Amnon Heiman
c6723d2f61 Adding the commitlog API implementation
This adds the implementation of the commitlog API.
Current implementation contains:
/commitlog/segments/active
That returns a list of the active file names, and
/commitlog/segments/archiving
Which always return an empty list as we archiving is not supported at
the moment

The doc file is under:
/api-doc/commitlog

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-05-19 15:27:59 +03:00
Avi Kivity
b3b553821f Merge branch 'master' of github.com:cloudius-systems/seastar into db
Contains patch from Amnon to update the calls to http set_routes().
2015-04-26 13:16:35 +03:00
Amnon Heiman
aeb66fa409 API: Adding the stroage service stub
The storage service API will hold the equivelent information of the
StorageServiceMBean.

This adds the API with one stubed method the get local hostid.

After the patch the storage_service doc will be available at:
http://localhost:10000/api-doc/storage_service/

And the stubed local host id will be under:
http://localhost:10000/storage_service/local_hostid

and will return an empty string

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-04-13 18:57:14 +03:00
Amnon Heiman
e5007f49ae Adding the API to urchin
This adds the API to urchin, all API related files will be placed under
the api directory.

The API server uses a context object to access global parameters,
typically the different servers themselves.

After this patch the api-doc will be available, though empty under:
http://localhost:10000/api-doc

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-04-13 18:57:14 +03:00