Commit Graph

17 Commits (b8b396807e020395d50af280d3740d0992f14608)

Author SHA1 Message Date
Philip O'Toole df7ed03cd4 Actually allow HTTP logging to be enabled 2015-04-21 15:21:21 -07:00
Philip O'Toole 969b8c4d70 Don't log HTTP accesses during testing 2015-04-17 16:18:28 -07:00
Philip O'Toole a3fbba33da Allow control of HTTP logging 2015-04-17 16:18:28 -07:00
Jason Wilder 2f394a5cff Move snapshot server to cluster handler
This removes the separate port listener and adds it as a route
on the cluster port.
2015-04-13 16:27:23 -06:00
Jason Wilder bdcb949916 Rename serveMetadata to serveData 2015-04-13 15:38:42 -06:00
Jason Wilder 0bf03347cb Rename serveData to serveAPI 2015-04-13 15:38:42 -06:00
Jason Wilder e47ee66b07 Make top-level handler less brittle
Move the data node specific routes under a common /data prefix so
add new handler does require updates to the top level handler as well.
2015-04-13 15:38:42 -06:00
Philip O'Toole 2c554f45ba Hook up "run_mapper" in top-level handler
No doubt about it, URL routing is definitely brittle and needs work.
2015-04-10 16:19:46 -07:00
Ben Johnson eaf4bfca0a Fix term signal.
This commit changes raft so that term changes are made immediately and
term change signals are made afterward. Previously, election timeouts
were invalidated by incoming term changes which caused an election loop.

Stale term was also fixed and http/pprof was added too.
2015-04-10 13:52:20 -06:00
Jason Wilder 94f9ad0624 Fix unable to join race
2015/04/08 22:27:01 no broker or server configured to handle messaging endpoints
2015/04/08 22:27:02 join: failed to connect data node: http://box296:9012: unable to join
2015/04/08 22:27:02 join: failed to connect data node to any specified server

There is a race when joining a data only node to a broker and another data only node between the
data node heartbeater and the join operation.  If the heartbeater
fire before the join attempt, it's possible for the booting data node
to be selected as the first data node for redirection by the broker.
The join attempt would request a data node endpoint on the broker "/data_nodes"
but since the broker cannot handle it, it would redirect to a valid broker.

During this race, the broker would redirect the request back to the same server.  If
this happens, the data node would get stuck and not be able to join because it's
still booting.

To work around this, the redirect is randonmized and the join calls will not attempt
to call itself and instead re-request the original URL.  A better fix might be to
not start the heartbeater until after the datanode has joined or initialized.
2015-04-08 20:50:24 -06:00
Jason Wilder d6d12f2342 Fix erroneous logging for http handlers 2015-04-08 20:50:24 -06:00
Jason Wilder 8b5307f6e8 Remove all join URLs from config
This removes all join URLs from the config.  To join a node to a
cluster, the URL of another member of the cluster should be passed
on the command line w/ the -join flag.  The join URLs can now be
any node regardless of whether the node is a broker only or data
only node.  At join time, the receiving node will redirect the
request to a valid broker or data node if it cannot handle the request
itself.
2015-04-06 16:38:01 -06:00
Jason Wilder b85eba550d Separate cluster and API endpoints 2015-04-06 16:38:00 -06:00
Jason Wilder 6d4c7e9cd5 Handle broker and data node endpoints regardless of role
This is a pre-requisite for #1934.  When running separate
broker and data nodes, you currently need to know what role
a host is performing.  This complicates cluster setup in
that you must configure separate broker URLs and data node
URLs.

This change allows a broker only node to redirect data nodes endpoints
to a valid data node and a data only node to redirect broker
endpoints to a valid broker.
2015-04-03 21:00:43 -06:00
Ben Johnson 50a0826026 Add broker snapshot/restore and CLI join. 2015-01-06 17:21:32 -07:00
Ben Johnson 70d561aa6f Refactor main/run. 2014-12-30 15:46:50 -07:00
Philip O'Toole 73f304ca1e Bring up broker endpoints
If a Broker is running on the node, we need ensure the handler will
service its endpoints.
2014-12-11 14:42:21 -08:00