From 5d5e400055a8b8327f18e569f9cffe8eb5d8e83d Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Wed, 20 May 2015 11:14:55 +0900 Subject: [PATCH] Update edoc --- edoc/edoc-info | 7 +- edoc/machi_admin_util.html | 2 +- edoc/machi_app.html | 2 +- edoc/machi_chain_manager1.html | 66 ++++-- edoc/machi_chain_repair.html | 49 +++++ edoc/machi_chash.html | 2 +- edoc/machi_cr_client.html | 170 +++++++++++++++ edoc/machi_flu1.html | 46 +++- edoc/machi_flu1_client.html | 118 ++++++++--- edoc/machi_flu_psup.html | 77 +++++++ edoc/machi_flu_sup.html | 2 +- edoc/machi_projection.html | 60 ++++-- edoc/machi_projection_store.html | 20 +- edoc/machi_proxy_flu1_client.html | 82 ++++++- edoc/machi_sequencer.html | 2 +- edoc/machi_sup.html | 2 +- edoc/machi_util.html | 54 +++-- edoc/machi_yessir_client.html | 342 ++++++++++++++++++++++++++++++ edoc/modules-frame.html | 6 +- edoc/overview-summary.html | 2 +- 20 files changed, 995 insertions(+), 116 deletions(-) create mode 100644 edoc/machi_chain_repair.html create mode 100644 edoc/machi_cr_client.html create mode 100644 edoc/machi_flu_psup.html create mode 100644 edoc/machi_yessir_client.html diff --git a/edoc/edoc-info b/edoc/edoc-info index f119ed0..f075620 100644 --- a/edoc/edoc-info +++ b/edoc/edoc-info @@ -1,7 +1,8 @@ %% encoding: UTF-8 {application,machi}. {packages,[]}. -{modules,[machi_admin_util,machi_app,machi_chain_manager1,machi_chash, - machi_flu1,machi_flu1_client,machi_flu_sup,machi_projection, +{modules,[machi_admin_util,machi_app,machi_chain_manager1,machi_chain_repair, + machi_chash,machi_cr_client,machi_flu1,machi_flu1_client, + machi_flu_psup,machi_flu_sup,machi_projection, machi_projection_store,machi_proxy_flu1_client,machi_sequencer, - machi_sup,machi_util]}. + machi_sup,machi_util,machi_yessir_client]}. diff --git a/edoc/machi_admin_util.html b/edoc/machi_admin_util.html index 744230a..dca2800 100644 --- a/edoc/machi_admin_util.html +++ b/edoc/machi_admin_util.html @@ -55,6 +55,6 @@
-

Generated by EDoc, Apr 8 2015, 17:31:11.

+

Generated by EDoc, May 20 2015, 11:11:34.

diff --git a/edoc/machi_app.html b/edoc/machi_app.html index 8bba636..6d4c01b 100644 --- a/edoc/machi_app.html +++ b/edoc/machi_app.html @@ -34,6 +34,6 @@
-

Generated by EDoc, Apr 8 2015, 17:31:11.

+

Generated by EDoc, May 20 2015, 11:11:34.

diff --git a/edoc/machi_chain_manager1.html b/edoc/machi_chain_manager1.html index e2d0bec..3fb60dd 100644 --- a/edoc/machi_chain_manager1.html +++ b/edoc/machi_chain_manager1.html @@ -42,18 +42,21 @@ distributed state of a single Machi Chain Replication chain.

handle_cast/2 handle_info/2 init/1 -make_projection_summary/1 +inner_projection_exists/1 +inner_projection_or_self/1 +make_chmgr_regname/1 ping/1 projection_transitions_are_sane/2 +set_active/2 +set_chain_members/2Set chain members list. +start_link/2 start_link/3 -start_link/4 stop/1 terminate/2 test_calc_projection/2 -test_calc_proposed_projection/1 test_react_to_env/1 test_read_latest_public_projection/2 -test_write_proposed_projection/1 +test_write_public_projection/2

Function Details

@@ -70,17 +73,17 @@ distributed state of a single Machi Chain Replication chain.

handle_call/3

-

handle_call(Call, From, Ch_mgr) -> any()

+

handle_call(Call, From, S) -> any()

handle_cast/2

-

handle_cast(Cast, Ch_mgr) -> any()

+

handle_cast(Cast, S) -> any()

handle_info/2

-

handle_info(Msg, S) -> any()

+

handle_info(Msg, Ch_mgr) -> any()

init/1

@@ -88,9 +91,19 @@ distributed state of a single Machi Chain Replication chain.

init(X1) -> any()

-

make_projection_summary/1

+

inner_projection_exists/1

-

make_projection_summary(Projection_v1) -> any()

+

inner_projection_exists(P) -> any()

+
+ +

inner_projection_or_self/1

+
+

inner_projection_or_self(P) -> any()

+
+ +

make_chmgr_regname/1

+
+

make_chmgr_regname(A) -> any()

ping/1

@@ -103,14 +116,30 @@ distributed state of a single Machi Chain Replication chain.

projection_transitions_are_sane(Ps, RelativeToServer) -> any()

-

start_link/3

+

set_active/2

-

start_link(MyName, All_list, MyFLUPid) -> any()

+

set_active(Pid, Boolean) -> any()

-

start_link/4

+

set_chain_members/2

-

start_link(MyName, All_list, MyFLUPid, MgrOpts) -> any()

+

set_chain_members(Pid, MembersDict) -> any()

+

Set chain members list.

+ + NOTE: This implementation is a bit brittle, in that an author with + higher rank may try to re-suggest the old membership list if it + races with an author of lower rank. For now, we suggest calling + set_chain_members() first on the author of highest rank and finish + with lowest rank, i.e. name z* first, name a* last.

+ +

start_link/2

+
+

start_link(MyName, MembersDict) -> any()

+
+ +

start_link/3

+
+

start_link(MyName, MembersDict, MgrOpts) -> any()

stop/1

@@ -128,11 +157,6 @@ distributed state of a single Machi Chain Replication chain.

test_calc_projection(Pid, KeepRunenvP) -> any()

-

test_calc_proposed_projection/1

-
-

test_calc_proposed_projection(Pid) -> any()

-
-

test_react_to_env/1

test_react_to_env(Pid) -> any()

@@ -143,13 +167,13 @@ distributed state of a single Machi Chain Replication chain.

test_read_latest_public_projection(Pid, ReadRepairP) -> any()

-

test_write_proposed_projection/1

+

test_write_public_projection/2

-

test_write_proposed_projection(Pid) -> any()

+

test_write_public_projection(Pid, Proj) -> any()


-

Generated by EDoc, Apr 8 2015, 17:31:11.

+

Generated by EDoc, May 20 2015, 11:11:34.

diff --git a/edoc/machi_chain_repair.html b/edoc/machi_chain_repair.html new file mode 100644 index 0000000..61d23fb --- /dev/null +++ b/edoc/machi_chain_repair.html @@ -0,0 +1,49 @@ + + + + +Module machi_chain_repair + + + + +
+ +

Module machi_chain_repair

+Erlang API for the Machi FLU TCP protocol version 1, with a +proxy-process style API for hiding messy details such as TCP +connection/disconnection with the remote Machi server. + + +

Description

Erlang API for the Machi FLU TCP protocol version 1, with a +proxy-process style API for hiding messy details such as TCP +connection/disconnection with the remote Machi server.

+ +

Machi is intentionally avoiding using distributed Erlang for + Machi's communication. This design decision makes Erlang-side code + more difficult & complex, but it's the price to pay for some +language independence. Later in Machi's life cycle, we need to +(re-)implement some components in a non-Erlang/BEAM-based language.

+ + This module implements a "man in the middle" proxy between the + Erlang client and Machi server (which is on the "far side" of a TCP + connection to somewhere). This proxy process will always execute + on the same Erlang node as the Erlang client that uses it. The + proxy is intended to be a stable, long-lived process that survives + TCP communication problems with the remote server. +

Function Index

+ +
repair/7
+ +

Function Details

+ +

repair/7

+
+

repair(ConsistencyMode, Src, Repairing, UPI, MembersDict, ETS, Opts) -> any()

+
+
+ + +

Generated by EDoc, May 20 2015, 11:11:34.

+ + diff --git a/edoc/machi_chash.html b/edoc/machi_chash.html index 7f2f293..58f523b 100644 --- a/edoc/machi_chash.html +++ b/edoc/machi_chash.html @@ -166,6 +166,6 @@ list.


-

Generated by EDoc, Apr 8 2015, 17:31:11.

+

Generated by EDoc, May 20 2015, 11:11:34.

diff --git a/edoc/machi_cr_client.html b/edoc/machi_cr_client.html new file mode 100644 index 0000000..32e7384 --- /dev/null +++ b/edoc/machi_cr_client.html @@ -0,0 +1,170 @@ + + + + +Module machi_cr_client + + + + +
+ +

Module machi_cr_client

+Erlang API for the Machi client-implemented Chain Replication +(CORFU-style) protocol. + +

Behaviours: gen_server.

+ +

Description

Erlang API for the Machi client-implemented Chain Replication +(CORFU-style) protocol.

+ +

The major operation processing is implemented in a state machine-like + manner. Before attempting an operation X, there's an initial + operation pre-X that takes care of updating the epoch id, + restarting client protocol proxies, and if there's any server + instability (e.g. some server is wedged), then insert some sleep + time. When the chain appears to have stabilized, then we try the X +operation again.

+ +

Function name for the pre-X stuff is usually X(), and the + function name for the X stuff is usually X2(). (I.e., the X + stuff follows after pre-X and therefore has a 2 suffix on the +function name.)

+ + In the case of read repair, there are two stages: find the value to + perform the repair, then perform the repair writes. In the case of + the repair writes, the pre-X function is named read_repair3(), + and the X function is named read_repair4(). + +

Function Index

+ + + + + + + + + + + + + + + + + + +
append_chunk/3Append a chunk (binary- or iolist-style) of data to a file + with Prefix.
append_chunk/4Append a chunk (binary- or iolist-style) of data to a file + with Prefix.
append_chunk_extra/4Append a chunk (binary- or iolist-style) of data to a file + with Prefix.
append_chunk_extra/5Append a chunk (binary- or iolist-style) of data to a file + with Prefix.
checksum_list/2Fetch the list of chunk checksums for File.
checksum_list/3Fetch the list of chunk checksums for File.
code_change/3
handle_call/3
handle_cast/2
handle_info/2
init/1
list_files/1Fetch the list of all files on the remote FLU.
list_files/2Fetch the list of all files on the remote FLU.
quit/1Quit & close the connection to remote FLU and stop our + proxy process.
read_chunk/4
read_chunk/5Read a chunk of data of size Size from File at Offset.
start_link/1Start a local, long-lived process that will be our steady + & reliable communication proxy with the fickle & flaky + remote Machi server.
terminate/2
+ +

Function Details

+ +

append_chunk/3

+
+

append_chunk(PidSpec, Prefix, Chunk) -> any()

+

Append a chunk (binary- or iolist-style) of data to a file + with Prefix.

+ +

append_chunk/4

+
+

append_chunk(PidSpec, Prefix, Chunk, Timeout) -> any()

+

Append a chunk (binary- or iolist-style) of data to a file + with Prefix.

+ +

append_chunk_extra/4

+
+

append_chunk_extra(PidSpec, Prefix, Chunk, ChunkExtra) -> any()

+

Append a chunk (binary- or iolist-style) of data to a file + with Prefix.

+ +

append_chunk_extra/5

+
+

append_chunk_extra(PidSpec, Prefix, Chunk, ChunkExtra, Timeout) -> any()

+

Append a chunk (binary- or iolist-style) of data to a file + with Prefix.

+ +

checksum_list/2

+
+

checksum_list(PidSpec, File) -> any()

+

Fetch the list of chunk checksums for File.

+ +

checksum_list/3

+
+

checksum_list(PidSpec, File, Timeout) -> any()

+

Fetch the list of chunk checksums for File.

+ +

code_change/3

+
+

code_change(OldVsn, S, Extra) -> any()

+
+ +

handle_call/3

+
+

handle_call(Request, From, S) -> any()

+
+ +

handle_cast/2

+
+

handle_cast(Msg, S) -> any()

+
+ +

handle_info/2

+
+

handle_info(Info, S) -> any()

+
+ +

init/1

+
+

init(X1) -> any()

+
+ +

list_files/1

+
+

list_files(PidSpec) -> any()

+

Fetch the list of all files on the remote FLU.

+ +

list_files/2

+
+

list_files(PidSpec, Timeout) -> any()

+

Fetch the list of all files on the remote FLU.

+ +

quit/1

+
+

quit(PidSpec) -> any()

+

Quit & close the connection to remote FLU and stop our + proxy process.

+ +

read_chunk/4

+
+

read_chunk(PidSpec, File, Offset, Size) -> any()

+
+ +

read_chunk/5

+
+

read_chunk(PidSpec, File, Offset, Size, Timeout) -> any()

+

Read a chunk of data of size Size from File at Offset.

+ +

start_link/1

+
+

start_link(P_srvr_list) -> any()

+

Start a local, long-lived process that will be our steady + & reliable communication proxy with the fickle & flaky + remote Machi server.

+ +

terminate/2

+
+

terminate(Reason, State) -> any()

+
+
+ + +

Generated by EDoc, May 20 2015, 11:11:34.

+ + diff --git a/edoc/machi_flu1.html b/edoc/machi_flu1.html index 3ce6902..2c003c4 100644 --- a/edoc/machi_flu1.html +++ b/edoc/machi_flu1.html @@ -32,20 +32,47 @@ services are accessed using the same single TCP port.

The FLU is named after the CORFU server "FLU" or "FLash Unit" server.

- TODO There is one major missing feature in this FLU implementation: +

TODO There is a major missing feature in this FLU implementation: there is no "write-once" enforcement for any position in a Machi file. At the moment, we rely on correct behavior of the client - & the sequencer to avoid overwriting data. In the Real World, - however, all Machi file data is supposed to be exactly write-once - to avoid problems with bugs, wire protocol corruption, malicious - clients, etc. + & the sequencer to avoid overwriting data. In the Real World, +however, all Machi file data is supposed to be exactly write-once +to avoid problems with bugs, wire protocol corruption, malicious +clients, etc.

+ +

TODO The per-file metadata tuple store is missing from this implementation.

+ +

TODO Section 4.1 ("The FLU") of the Machi design doc suggests that +the FLU keep track of the epoch number of the last file write (and +perhaps last metadata write), as an optimization for inter-FLU data +replication/chain repair.

+ + TODO Section 4.2 ("The Sequencer") says that the sequencer must + change its file assignments to new & unique names whenever we move + to wedge state. This is not yet implemented. In the current + Erlang process scheme (which will probably be changing soon), a + simple implementation would stop all existing processes that are + running run_seq_append_server().

Function Index

- +
start_link/1
+ + +
make_listener_regname/1
make_projection_server_regname/1
start_link/1
stop/1
update_wedge_state/3

Function Details

+

make_listener_regname/1

+
+

make_listener_regname(BaseName) -> any()

+
+ +

make_projection_server_regname/1

+
+

make_projection_server_regname(BaseName) -> any()

+
+

start_link/1

start_link(Rest) -> any()

@@ -55,9 +82,14 @@ services are accessed using the same single TCP port.

stop(Pid) -> any()

+ +

update_wedge_state/3

+
+

update_wedge_state(PidSpec, Boolean, EpochId) -> any()

+

-

Generated by EDoc, Apr 8 2015, 17:31:11.

+

Generated by EDoc, May 20 2015, 11:11:34.

diff --git a/edoc/machi_flu1_client.html b/edoc/machi_flu1_client.html index f1f6203..8bc99af 100644 --- a/edoc/machi_flu1_client.html +++ b/edoc/machi_flu1_client.html @@ -48,6 +48,10 @@

epoch_num() = -1 | non_neg_integer()

+

error_general()

+

error_general() = bad_arg | wedged

+ +

file_info()

file_info() = {file_size(), file_name_s()}

@@ -80,6 +84,10 @@

inet_port() = inet:port_number()

+

port_wrap()

+

port_wrap() = {w, atom(), term()}

+ +

projection()

projection() = #projection_v1{}

@@ -93,16 +101,23 @@ with Prefix. append_chunk/5Append a chunk (binary- or iolist-style) of data to a file with Prefix. +append_chunk_extra/5Append a chunk (binary- or iolist-style) of data to a file + with Prefix and also request an additional Extra bytes. +append_chunk_extra/6Append a chunk (binary- or iolist-style) of data to a file + with Prefix and also request an additional Extra bytes. checksum_list/3Fetch the list of chunk checksums for File. checksum_list/4Fetch the list of chunk checksums for File. +connect/1 +connected_p/1 delete_migration/3Restricted API: Delete a file after it has been successfully migrated. delete_migration/4Restricted API: Delete a file after it has been successfully migrated. +disconnect/1 get_all_projections/2Get all projections from the FLU's projection store. get_all_projections/3Get all projections from the FLU's projection store. -get_latest_epoch/2Get the latest epoch number + checksum from the FLU's projection store. -get_latest_epoch/3Get the latest epoch number + checksum from the FLU's projection store. +get_latest_epochid/2Get the latest epoch number + checksum from the FLU's projection store. +get_latest_epochid/3Get the latest epoch number + checksum from the FLU's projection store. list_all_projections/2Get all epoch numbers from the FLU's projection store. list_all_projections/3Get all epoch numbers from the FLU's projection store. list_files/2Fetch the list of all files on the remote FLU. @@ -118,6 +133,8 @@ erasure coded. trunc_hack/4Restricted API: Truncate a file after it has been successfully erasure coded. +wedge_status/1Fetch the wedge status from the remote FLU. +wedge_status/2Fetch the wedge status from the remote FLU. write_chunk/5Restricted API: Write a chunk of already-sequenced data to File at Offset. write_chunk/6Restricted API: Write a chunk of already-sequenced data to @@ -130,41 +147,78 @@

append_chunk/4

-

append_chunk(Sock::port(), EpochID::epoch_id(), Prefix::file_prefix(), Chunk::chunk()) -> {ok, chunk_pos()} | {error, term()}

+

append_chunk(Sock::port_wrap(), EpochID::epoch_id(), Prefix::file_prefix(), Chunk::chunk()) -> {ok, chunk_pos()} | {error, error_general()} | {error, term()}

Append a chunk (binary- or iolist-style) of data to a file with Prefix.

append_chunk/5

-

append_chunk(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), Prefix::file_prefix(), Chunk::chunk()) -> {ok, chunk_pos()} | {error, term()}

+

append_chunk(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), Prefix::file_prefix(), Chunk::chunk()) -> {ok, chunk_pos()} | {error, error_general()} | {error, term()}

Append a chunk (binary- or iolist-style) of data to a file with Prefix.

+

append_chunk_extra/5

+
+

append_chunk_extra(Sock::port_wrap(), EpochID::epoch_id(), Prefix::file_prefix(), Chunk::chunk(), ChunkExtra::chunk_size()) -> {ok, chunk_pos()} | {error, error_general()} | {error, term()}

+

Append a chunk (binary- or iolist-style) of data to a file + with Prefix and also request an additional Extra bytes.

+ + For example, if the Chunk size is 1 KByte and Extra is 4K Bytes, then + the file offsets that follow Chunk's position for the following 4K will + be reserved by the file sequencer for later write(s) by the + write_chunk() API.

+ +

append_chunk_extra/6

+
+

append_chunk_extra(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), Prefix::file_prefix(), Chunk::chunk(), ChunkExtra::chunk_size()) -> {ok, chunk_pos()} | {error, error_general()} | {error, term()}

+

Append a chunk (binary- or iolist-style) of data to a file + with Prefix and also request an additional Extra bytes.

+ + For example, if the Chunk size is 1 KByte and Extra is 4K Bytes, then + the file offsets that follow Chunk's position for the following 4K will + be reserved by the file sequencer for later write(s) by the + write_chunk() API.

+

checksum_list/3

-

checksum_list(Sock::port(), EpochID::epoch_id(), File::file_name()) -> {ok, [chunk_csum()]} | {error, term()}

+

checksum_list(Sock::port_wrap(), EpochID::epoch_id(), File::file_name()) -> {ok, [chunk_csum()]} | {error, error_general() | no_such_file | partial_read} | {error, term()}

Fetch the list of chunk checksums for File.

checksum_list/4

-

checksum_list(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name()) -> {ok, [chunk_csum()]} | {error, term()}

+

checksum_list(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name()) -> {ok, [chunk_csum()]} | {error, error_general() | no_such_file} | {error, term()}

Fetch the list of chunk checksums for File.

+

connect/1

+
+

connect(P_srvr) -> any()

+
+ +

connected_p/1

+
+

connected_p(X1) -> any()

+
+

delete_migration/3

-

delete_migration(Sock::port(), EpochID::epoch_id(), File::file_name()) -> ok | {error, term()}

+

delete_migration(Sock::port_wrap(), EpochID::epoch_id(), File::file_name()) -> ok | {error, error_general() | no_such_file} | {error, term()}

Restricted API: Delete a file after it has been successfully migrated.

delete_migration/4

-

delete_migration(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name()) -> ok | {error, term()}

+

delete_migration(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name()) -> ok | {error, error_general() | no_such_file} | {error, term()}

Restricted API: Delete a file after it has been successfully migrated.

+

disconnect/1

+
+

disconnect(WS) -> any()

+
+

get_all_projections/2

-

get_all_projections(Sock::port(), ProjType::projection_type()) -> {ok, [projection()]} | {error, term()}

+

get_all_projections(Sock::port_wrap(), ProjType::projection_type()) -> {ok, [projection()]} | {error, term()}

Get all projections from the FLU's projection store.

get_all_projections/3

@@ -172,19 +226,19 @@

get_all_projections(Host::inet_host(), TcpPort::inet_port(), ProjType::projection_type()) -> {ok, [projection()]} | {error, term()}

Get all projections from the FLU's projection store.

-

get_latest_epoch/2

+

get_latest_epochid/2

-

get_latest_epoch(Sock::port(), ProjType::projection_type()) -> {ok, epoch_id()} | {error, term()}

+

get_latest_epochid(Sock::port_wrap(), ProjType::projection_type()) -> {ok, epoch_id()} | {error, term()}

Get the latest epoch number + checksum from the FLU's projection store.

-

get_latest_epoch/3

+

get_latest_epochid/3

-

get_latest_epoch(Host::inet_host(), TcpPort::inet_port(), ProjType::projection_type()) -> {ok, epoch_id()} | {error, term()}

+

get_latest_epochid(Host::inet_host(), TcpPort::inet_port(), ProjType::projection_type()) -> {ok, epoch_id()} | {error, term()}

Get the latest epoch number + checksum from the FLU's projection store.

list_all_projections/2

-

list_all_projections(Sock::port(), ProjType::projection_type()) -> {ok, [non_neg_integer()]} | {error, term()}

+

list_all_projections(Sock::port_wrap(), ProjType::projection_type()) -> {ok, [non_neg_integer()]} | {error, term()}

Get all epoch numbers from the FLU's projection store.

list_all_projections/3

@@ -194,7 +248,7 @@

list_files/2

-

list_files(Sock::port(), EpochID::epoch_id()) -> {ok, [file_info()]} | {error, term()}

+

list_files(Sock::port_wrap(), EpochID::epoch_id()) -> {ok, [file_info()]} | {error, term()}

Fetch the list of all files on the remote FLU.

list_files/3

@@ -204,22 +258,22 @@

quit/1

-

quit(Sock::port()) -> ok

+

quit(Sock::port_wrap()) -> ok

Quit & close the connection to remote FLU.

read_chunk/5

-

read_chunk(Sock::port(), EpochID::epoch_id(), File::file_name(), Offset::file_offset(), Size::chunk_size()) -> {ok, chunk_s()} | {error, term()}

+

read_chunk(Sock::port_wrap(), EpochID::epoch_id(), File::file_name(), Offset::file_offset(), Size::chunk_size()) -> {ok, chunk_s()} | {error, error_general() | not_written | partial_read} | {error, term()}

Read a chunk of data of size Size from File at Offset.

read_chunk/6

-

read_chunk(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name(), Offset::file_offset(), Size::chunk_size()) -> {ok, chunk_s()} | {error, term()}

+

read_chunk(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name(), Offset::file_offset(), Size::chunk_size()) -> {ok, chunk_s()} | {error, error_general() | not_written | partial_read} | {error, term()}

Read a chunk of data of size Size from File at Offset.

read_latest_projection/2

-

read_latest_projection(Sock::port(), ProjType::projection_type()) -> {ok, projection()} | {error, not_written} | {error, term()}

+

read_latest_projection(Sock::port_wrap(), ProjType::projection_type()) -> {ok, projection()} | {error, not_written} | {error, term()}

Get the latest projection from the FLU's projection store for ProjType

read_latest_projection/3

@@ -229,41 +283,51 @@

read_projection/3

-

read_projection(Sock::port(), ProjType::projection_type(), Epoch::epoch_num()) -> {ok, projection()} | {error, written} | {error, term()}

+

read_projection(Sock::port_wrap(), ProjType::projection_type(), Epoch::epoch_num()) -> {ok, projection()} | {error, not_written} | {error, term()}

Read a projection Proj of type ProjType.

read_projection/4

-

read_projection(Host::inet_host(), TcpPort::inet_port(), ProjType::projection_type(), Epoch::epoch_num()) -> {ok, projection()} | {error, written} | {error, term()}

+

read_projection(Host::inet_host(), TcpPort::inet_port(), ProjType::projection_type(), Epoch::epoch_num()) -> {ok, projection()} | {error, not_written} | {error, term()}

Read a projection Proj of type ProjType.

trunc_hack/3

-

trunc_hack(Sock::port(), EpochID::epoch_id(), File::file_name()) -> ok | {error, term()}

+

trunc_hack(Sock::port_wrap(), EpochID::epoch_id(), File::file_name()) -> ok | {error, error_general() | no_such_file} | {error, term()}

Restricted API: Truncate a file after it has been successfully erasure coded.

trunc_hack/4

-

trunc_hack(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name()) -> ok | {error, term()}

+

trunc_hack(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name()) -> ok | {error, error_general() | no_such_file} | {error, term()}

Restricted API: Truncate a file after it has been successfully erasure coded.

+

wedge_status/1

+
+

wedge_status(Sock::port_wrap()) -> {ok, {boolean(), pv1_epoch()}} | {error, term()}

+

Fetch the wedge status from the remote FLU.

+ +

wedge_status/2

+
+

wedge_status(Host::inet_host(), TcpPort::inet_port()) -> {ok, {boolean(), pv1_epoch()}} | {error, term()}

+

Fetch the wedge status from the remote FLU.

+

write_chunk/5

-

write_chunk(Sock::port(), EpochID::epoch_id(), File::file_name(), Offset::file_offset(), Chunk::chunk()) -> ok | {error, term()}

+

write_chunk(Sock::port_wrap(), EpochID::epoch_id(), File::file_name(), Offset::file_offset(), Chunk::chunk()) -> ok | {error, error_general()} | {error, term()}

Restricted API: Write a chunk of already-sequenced data to File at Offset.

write_chunk/6

-

write_chunk(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name(), Offset::file_offset(), Chunk::chunk()) -> ok | {error, term()}

+

write_chunk(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name(), Offset::file_offset(), Chunk::chunk()) -> ok | {error, error_general()} | {error, term()}

Restricted API: Write a chunk of already-sequenced data to File at Offset.

write_projection/3

-

write_projection(Sock::port(), ProjType::projection_type(), Proj::projection()) -> ok | {error, written} | {error, term()}

+

write_projection(Sock::port_wrap(), ProjType::projection_type(), Proj::projection()) -> ok | {error, written} | {error, term()}

Write a projection Proj of type ProjType.

write_projection/4

@@ -273,6 +337,6 @@
-

Generated by EDoc, Apr 8 2015, 17:31:11.

+

Generated by EDoc, May 20 2015, 11:11:34.

diff --git a/edoc/machi_flu_psup.html b/edoc/machi_flu_psup.html new file mode 100644 index 0000000..502d194 --- /dev/null +++ b/edoc/machi_flu_psup.html @@ -0,0 +1,77 @@ + + + + +Module machi_flu_psup + + + + +
+ +

Module machi_flu_psup

+Supervisor for Machi FLU servers and their related support + servers. + +

Behaviours: supervisor.

+ +

Description

Supervisor for Machi FLU servers and their related support + servers. +

Function Index

+ + + + + + + + +
init/1
make_mgr_supname/1
make_p_regname/1
make_package_spec/4
make_proj_supname/1
start_flu_package/4
start_link/4
stop_flu_package/1
+ +

Function Details

+ +

init/1

+
+

init(X1) -> any()

+
+ +

make_mgr_supname/1

+
+

make_mgr_supname(MgrName) -> any()

+
+ +

make_p_regname/1

+
+

make_p_regname(FluName) -> any()

+
+ +

make_package_spec/4

+
+

make_package_spec(FluName, TcpPort, DataDir, Props) -> any()

+
+ +

make_proj_supname/1

+
+

make_proj_supname(ProjName) -> any()

+
+ +

start_flu_package/4

+
+

start_flu_package(FluName, TcpPort, DataDir, Props) -> any()

+
+ +

start_link/4

+
+

start_link(FluName, TcpPort, DataDir, Props) -> any()

+
+ +

stop_flu_package/1

+
+

stop_flu_package(FluName) -> any()

+
+
+ + +

Generated by EDoc, May 20 2015, 11:11:34.

+ + diff --git a/edoc/machi_flu_sup.html b/edoc/machi_flu_sup.html index 46a3345..e90de72 100644 --- a/edoc/machi_flu_sup.html +++ b/edoc/machi_flu_sup.html @@ -36,6 +36,6 @@
-

Generated by EDoc, Apr 8 2015, 17:31:11.

+

Generated by EDoc, May 20 2015, 11:11:34.

diff --git a/edoc/machi_projection.html b/edoc/machi_projection.html index 59f9229..21ca159 100644 --- a/edoc/machi_projection.html +++ b/edoc/machi_projection.html @@ -15,14 +15,16 @@

Description

API for manipulating Machi projection data structures (i.e., records).

Function Index

- - +
compare/2Compare two projection records for equality (assuming that the - checksum element has been correctly calculated).
make_projection_summary/1Create a proplist-style summary of a projection record.
+ + - - + +
compare/2Compare two projection records for equality (assuming that the +checksum element has been correctly calculated).
make_members_dict/1Make a p_srvr_dict() out of a list of p_srvr() or out of a + p_srvr_dict().
make_summary/1Create a proplist-style summary of a projection record.
new/6Create a new projection record.
new/7Create a new projection record.
new/8Create a new projection record.
update_projection_checksum/1Update the checksum element of a projection record.
update_projection_dbg2/2Update the dbg2 element of a projection record.
update_checksum/1Update the checksum element of a projection record.
update_dbg2/2Update the dbg2 element of a projection record.

Function Details

@@ -30,41 +32,63 @@

compare/2

compare(Projection_v1::#projection_v1{}, Projection_v1::#projection_v1{}) -> integer()

-

Compare two projection records for equality (assuming that the - checksum element has been correctly calculated).

+

Compare two projection records for equality (assuming that the +checksum element has been correctly calculated).

+ + The name "compare" is probably too close to "rank"? This + comparison has nothing to do with projection ranking.

-

make_projection_summary/1

+

make_members_dict/1

-

make_projection_summary(Projection_v1) -> any()

+

make_members_dict(Ps::[p_srvr()] | p_srvr_dict()) -> p_srvr_dict()

+

Make a p_srvr_dict() out of a list of p_srvr() or out of a + p_srvr_dict().

+ +

If Ps is a p_srvr_dict(), then this function is usually a + no-op. However, if someone has tampered with the list and screwed + up its order, then we should fix it so orddict can work +correctly.

+ + If Ps is simply list(p_srvr()), in which case we'll convert it + to a p_srvr_dict().

+ +

make_summary/1

+
+

make_summary(Projection_v1) -> any()

Create a proplist-style summary of a projection record.

new/6

-

new(MyName, All_list, UPI_list, Down_list, Repairing_list, Ps) -> any()

+

new(MyName, MemberDict, UPI_list, Down_list, Repairing_list, Ps) -> any()

Create a new projection record.

new/7

-

new(EpochNum, MyName, All_list, Down_list, UPI_list, Repairing_list, Dbg) -> any()

+

new(EpochNum, MyName, MemberDict, Down_list, UPI_list, Repairing_list, Dbg) -> any()

Create a new projection record.

new/8

-

new(EpochNum, MyName, All_list0, Down_list, UPI_list, Repairing_list, Dbg, Dbg2) -> any()

-

Create a new projection record.

+

new(EpochNum, MyName, MembersDict0, Down_list, UPI_list, Repairing_list, Dbg, Dbg2) -> any()

+

Create a new projection record.

+ + The MemberDict0 argument may be a true p_srvr_dict() (i.e, it + is a well-formed orddict with the correct 2-tuple key-value form) + or it may be simply list(p_srvr()), in which case we'll convert it + to a p_srvr_dict().

-

update_projection_checksum/1

+

update_checksum/1

-

update_projection_checksum(P) -> any()

+

update_checksum(P) -> any()

Update the checksum element of a projection record.

-

update_projection_dbg2/2

+

update_dbg2/2

-

update_projection_dbg2(P, Dbg2) -> any()

+

update_dbg2(P, Dbg2) -> any()

Update the dbg2 element of a projection record.


-

Generated by EDoc, Apr 8 2015, 17:31:11.

+

Generated by EDoc, May 20 2015, 11:11:34.

diff --git a/edoc/machi_projection_store.html b/edoc/machi_projection_store.html index ed25ba3..feb45d6 100644 --- a/edoc/machi_projection_store.html +++ b/edoc/machi_projection_store.html @@ -34,8 +34,8 @@ module's API.

- - + + @@ -46,6 +46,7 @@ module's API.

+ @@ -69,14 +70,14 @@ module's API.

get_all_projections(PidSpec, ProjType, Timeout) -> any()

Fetch all projection records of type ProjType.

-

get_latest_epoch/2

+

get_latest_epochid/2

-

get_latest_epoch(PidSpec, ProjType) -> any()

+

get_latest_epochid(PidSpec, ProjType) -> any()

Fetch the latest epoch number + checksum for type ProjType.

-

get_latest_epoch/3

+

get_latest_epochid/3

-

get_latest_epoch(PidSpec, ProjType, Timeout) -> any()

+

get_latest_epochid(PidSpec, ProjType, Timeout) -> any()

Fetch the latest epoch number + checksum for type ProjType. projection.

@@ -130,6 +131,11 @@ module's API.

read_latest_projection(PidSpec, ProjType, Timeout) -> any()

Fetch the latest projection record for type ProjType.

+

set_wedge_notify_pid/2

+
+

set_wedge_notify_pid(PidSpec, NotifyWedgeStateChanges) -> any()

+
+

start_link/3

start_link(RegName, DataDir, NotifyWedgeStateChanges) -> any()

@@ -158,6 +164,6 @@ module's API.


code_change/3
get_all_projections/2Fetch all projection records of type ProjType.
get_all_projections/3Fetch all projection records of type ProjType.
get_latest_epoch/2Fetch the latest epoch number + checksum for type ProjType.
get_latest_epoch/3Fetch the latest epoch number + checksum for type ProjType.
get_latest_epochid/2Fetch the latest epoch number + checksum for type ProjType.
get_latest_epochid/3Fetch the latest epoch number + checksum for type ProjType.
handle_call/3
handle_cast/2
handle_info/2
read/4Fetch the projection record type ProjType for epoch number Epoch .
read_latest_projection/2Fetch the latest projection record for type ProjType.
read_latest_projection/3Fetch the latest projection record for type ProjType.
set_wedge_notify_pid/2
start_link/3Start a new projection store server.
terminate/2
write/3Write the projection record type ProjType for epoch number Epoch .
Overviewerlang logo
-

Generated by EDoc, Apr 8 2015, 17:31:11.

+

Generated by EDoc, May 20 2015, 11:11:34.

diff --git a/edoc/machi_proxy_flu1_client.html b/edoc/machi_proxy_flu1_client.html index 4cf46f4..b65a72a 100644 --- a/edoc/machi_proxy_flu1_client.html +++ b/edoc/machi_proxy_flu1_client.html @@ -37,13 +37,19 @@ language independence. Later in Machi's life cycle, we need to with Prefix. append_chunk/5Append a chunk (binary- or iolist-style) of data to a file with Prefix. +append_chunk_extra/5Append a chunk (binary- or iolist-style) of data to a file + with Prefix. +append_chunk_extra/6Append a chunk (binary- or iolist-style) of data to a file + with Prefix. checksum_list/3Fetch the list of chunk checksums for File. checksum_list/4Fetch the list of chunk checksums for File. code_change/3 get_all_projections/2Get all projections from the FLU's projection store. get_all_projections/3Get all projections from the FLU's projection store. -get_latest_epoch/2Get the latest epoch number + checksum from the FLU's projection store. -get_latest_epoch/3Get the latest epoch number + checksum from the FLU's projection store. +get_epoch_id/1Get the epoch_id() of the FLU's current/latest projection. +get_epoch_id/2Get the epoch_id() of the FLU's current/latest projection. +get_latest_epochid/2Get the latest epoch number + checksum from the FLU's projection store. +get_latest_epochid/3Get the latest epoch number + checksum from the FLU's projection store. handle_call/3 handle_cast/2 handle_info/2 @@ -63,7 +69,15 @@ language independence. Later in Machi's life cycle, we need to start_link/1Start a local, long-lived process that will be our steady & reliable communication proxy with the fickle & flaky remote Machi server. +start_proxies/1 +stop_proxies/1 terminate/2 +wedge_status/1Fetch the wedge status from the remote FLU. +wedge_status/2Fetch the wedge status from the remote FLU. +write_chunk/5Write a chunk (binary- or iolist-style) of data to a file + with Prefix at Offset. +write_chunk/6Write a chunk (binary- or iolist-style) of data to a file + with Prefix at Offset. write_projection/3Write a projection Proj of type ProjType. write_projection/4Write a projection Proj of type ProjType. @@ -82,6 +96,18 @@ language independence. Later in Machi's life cycle, we need to

Append a chunk (binary- or iolist-style) of data to a file with Prefix.

+

append_chunk_extra/5

+
+

append_chunk_extra(PidSpec, EpochID, Prefix, Chunk, ChunkExtra) -> any()

+

Append a chunk (binary- or iolist-style) of data to a file + with Prefix.

+ +

append_chunk_extra/6

+
+

append_chunk_extra(PidSpec, EpochID, Prefix, Chunk, ChunkExtra, Timeout) -> any()

+

Append a chunk (binary- or iolist-style) of data to a file + with Prefix.

+

checksum_list/3

checksum_list(PidSpec, EpochID, File) -> any()

@@ -107,14 +133,24 @@ language independence. Later in Machi's life cycle, we need to

get_all_projections(PidSpec, ProjType, Timeout) -> any()

Get all projections from the FLU's projection store.

-

get_latest_epoch/2

+

get_epoch_id/1

-

get_latest_epoch(PidSpec, ProjType) -> any()

+

get_epoch_id(PidSpec) -> any()

+

Get the epoch_id() of the FLU's current/latest projection.

+ +

get_epoch_id/2

+
+

get_epoch_id(PidSpec, Timeout) -> any()

+

Get the epoch_id() of the FLU's current/latest projection.

+ +

get_latest_epochid/2

+
+

get_latest_epochid(PidSpec, ProjType) -> any()

Get the latest epoch number + checksum from the FLU's projection store.

-

get_latest_epoch/3

+

get_latest_epochid/3

-

get_latest_epoch(PidSpec, ProjType, Timeout) -> any()

+

get_latest_epochid(PidSpec, ProjType, Timeout) -> any()

Get the latest epoch number + checksum from the FLU's projection store.

handle_call/3

@@ -200,11 +236,43 @@ language independence. Later in Machi's life cycle, we need to & reliable communication proxy with the fickle & flaky remote Machi server.

+

start_proxies/1

+
+

start_proxies(MembersDict) -> any()

+
+ +

stop_proxies/1

+
+

stop_proxies(ProxiesDict) -> any()

+
+

terminate/2

terminate(Reason, S) -> any()

+

wedge_status/1

+
+

wedge_status(PidSpec) -> any()

+

Fetch the wedge status from the remote FLU.

+ +

wedge_status/2

+
+

wedge_status(PidSpec, Timeout) -> any()

+

Fetch the wedge status from the remote FLU.

+ +

write_chunk/5

+
+

write_chunk(PidSpec, EpochID, File, Offset, Chunk) -> any()

+

Write a chunk (binary- or iolist-style) of data to a file + with Prefix at Offset.

+ +

write_chunk/6

+
+

write_chunk(PidSpec, EpochID, File, Offset, Chunk, Timeout) -> any()

+

Write a chunk (binary- or iolist-style) of data to a file + with Prefix at Offset.

+

write_projection/3

write_projection(PidSpec, ProjType, Proj) -> any()

@@ -217,6 +285,6 @@ language independence. Later in Machi's life cycle, we need to
-

Generated by EDoc, Apr 8 2015, 17:31:11.

+

Generated by EDoc, May 20 2015, 11:11:34.

diff --git a/edoc/machi_sequencer.html b/edoc/machi_sequencer.html index 0956867..3e8a04c 100644 --- a/edoc/machi_sequencer.html +++ b/edoc/machi_sequencer.html @@ -18,6 +18,6 @@ the future?
-

Generated by EDoc, Apr 8 2015, 17:31:11.

+

Generated by EDoc, May 20 2015, 11:11:34.

diff --git a/edoc/machi_sup.html b/edoc/machi_sup.html index aaa08c6..ff618ef 100644 --- a/edoc/machi_sup.html +++ b/edoc/machi_sup.html @@ -34,6 +34,6 @@
-

Generated by EDoc, Apr 8 2015, 17:31:11.

+

Generated by EDoc, May 20 2015, 11:11:34.

diff --git a/edoc/machi_util.html b/edoc/machi_util.html index f85a247..713c56a 100644 --- a/edoc/machi_util.html +++ b/edoc/machi_util.html @@ -30,7 +30,10 @@ based on I_size. make_binary/1Convert a compatible Erlang data type into a binary() equivalent. make_checksum_filename/2Calculate a checksum file path, by common convention. +make_checksum_filename/4Calculate a checksum file path, by common convention. +make_config_filename/2Calculate a config file path, by common convention. make_data_filename/2Calculate a file data file path, by common convention. +make_data_filename/4Calculate a file data file path, by common convention. make_projection_filename/2Calculate a projection store file path, by common convention. make_regname/1Create a registered name atom for FLU sequencer internal rendezvous/message passing use. @@ -45,12 +48,12 @@

bin_to_hexstr/1

-

bin_to_hexstr(X1) -> any()

+

bin_to_hexstr(X1::binary()) -> string()

Convert a binary() to a hexadecimal string.

checksum_chunk/1

-

checksum_chunk(Chunk) -> any()

+

checksum_chunk(Chunk::binary() | iolist()) -> binary()

Calculate a checksum for a chunk of file data.

connect/2

@@ -65,86 +68,101 @@

hexstr_to_bin/1

-

hexstr_to_bin(S) -> any()

+

hexstr_to_bin(S::string() | binary()) -> binary()

Convert a hexadecimal string to a binary().

hexstr_to_int/1

-

hexstr_to_int(X) -> any()

+

hexstr_to_int(X::string() | binary()) -> non_neg_integer()

Convert a hexadecimal string to an integer.

increment_max_filenum/2

-

increment_max_filenum(DataDir, Prefix) -> any()

+

increment_max_filenum(DataDir::string(), Prefix::string()) -> ok | {error, term()}

Increase the file size of a config file, which is used as the basis for a minimum sequence number.

info_msg/2

-

info_msg(Fmt, Args) -> any()

+

info_msg(Fmt::string(), Args::list()) -> term()

Log an 'info' level message.

int_to_hexbin/2

-

int_to_hexbin(I, I_size) -> any()

+

int_to_hexbin(I::non_neg_integer(), I_size::non_neg_integer()) -> binary()

Convert an integer into a hexadecimal string (in binary() form) whose length is based on I_size.

int_to_hexstr/2

-

int_to_hexstr(I, I_size) -> any()

+

int_to_hexstr(I::non_neg_integer(), I_size::non_neg_integer()) -> string()

Convert an integer into a hexadecimal string whose length is based on I_size.

make_binary/1

-

make_binary(X) -> any()

+

make_binary(X::binary() | iolist()) -> binary()

Convert a compatible Erlang data type into a binary() equivalent.

make_checksum_filename/2

-

make_checksum_filename(DataDir, FileName) -> any()

+

make_checksum_filename(DataDir::string(), FileName::[] | string() | binary()) -> string()

Calculate a checksum file path, by common convention.

+

make_checksum_filename/4

+
+

make_checksum_filename(DataDir::string(), Prefix::string(), SequencerName::atom() | string() | binary(), FileNum::integer()) -> string()

+

Calculate a checksum file path, by common convention.

+ +

make_config_filename/2

+
+

make_config_filename(DataDir::string(), Prefix::string()) -> string()

+

Calculate a config file path, by common convention.

+

make_data_filename/2

-

make_data_filename(DataDir, File) -> any()

+

make_data_filename(DataDir::string(), File::[] | string() | binary()) -> {binary(), string()}

+

Calculate a file data file path, by common convention.

+ +

make_data_filename/4

+
+

make_data_filename(DataDir::string(), Prefix::string(), SequencerName::atom() | string() | binary(), FileNum::integer()) -> {binary(), string()}

Calculate a file data file path, by common convention.

make_projection_filename/2

-

make_projection_filename(DataDir, File) -> any()

+

make_projection_filename(DataDir::string(), File::[] | string()) -> string()

Calculate a projection store file path, by common convention.

make_regname/1

-

make_regname(Prefix) -> any()

+

make_regname(Prefix::binary() | list()) -> atom()

Create a registered name atom for FLU sequencer internal rendezvous/message passing use.

make_string/1

-

make_string(X) -> any()

+

make_string(X::binary() | iolist()) -> string()

Convert a compatible Erlang data type into a string() equivalent.

read_max_filenum/2

-

read_max_filenum(DataDir, Prefix) -> any()

+

read_max_filenum(DataDir::string(), Prefix::string()) -> non_neg_integer()

Read the file size of a config file, which is used as the basis for a minimum sequence number.

verb/1

-

verb(Fmt) -> any()

+

verb(Fmt::string()) -> term()

Log a verbose message.

verb/2

-

verb(Fmt, Args) -> any()

+

verb(Fmt::string(), Args::list()) -> term()

Log a verbose message.


-

Generated by EDoc, Apr 8 2015, 17:31:11.

+

Generated by EDoc, May 20 2015, 11:11:34.

diff --git a/edoc/machi_yessir_client.html b/edoc/machi_yessir_client.html new file mode 100644 index 0000000..b690143 --- /dev/null +++ b/edoc/machi_yessir_client.html @@ -0,0 +1,342 @@ + + + + +Module machi_yessir_client + + + + +
+ +

Module machi_yessir_client

+"Yes, sir!" style dummy/mock client facade. + + +

Description

"Yes, sir!" style dummy/mock client facade. +

Data Types

+ +

chunk()

+

chunk() = binary() | iolist()

+

client can use either

+ +

chunk_csum()

+

chunk_csum() = {file_offset(), chunk_size(), binary()}

+ + +

chunk_pos()

+

chunk_pos() = {file_offset(), chunk_size(), file_name_s()}

+ + +

chunk_s()

+

chunk_s() = binary()

+

server always uses binary()

+ +

chunk_size()

+

chunk_size() = non_neg_integer()

+ + +

epoch_csum()

+

epoch_csum() = binary()

+ + +

epoch_id()

+

epoch_id() = {epoch_num(), epoch_csum()}

+ + +

epoch_num()

+

epoch_num() = -1 | non_neg_integer()

+ + +

error_general()

+

error_general() = bad_arg | wedged

+ + +

file_info()

+

file_info() = {file_size(), file_name_s()}

+ + +

file_name()

+

file_name() = binary() | list()

+ + +

file_name_s()

+

file_name_s() = binary()

+

server reply

+ +

file_offset()

+

file_offset() = non_neg_integer()

+ + +

file_prefix()

+

file_prefix() = binary() | list()

+ + +

file_size()

+

file_size() = non_neg_integer()

+ + +

inet_host()

+

inet_host() = inet:ip_address() | inet:hostname()

+ + +

inet_port()

+

inet_port() = inet:port_number()

+ + +

port_wrap()

+

port_wrap() = {w, atom(), term()}

+ + +

projection()

+

projection() = #projection_v1{}

+ + +

projection_type()

+

projection_type() = public | private

+ + +

Function Index

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
append_chunk/4Append a chunk (binary- or iolist-style) of data to a file + with Prefix.
append_chunk/5Append a chunk (binary- or iolist-style) of data to a file + with Prefix.
append_chunk_extra/5Append a chunk (binary- or iolist-style) of data to a file + with Prefix and also request an additional Extra bytes.
append_chunk_extra/6Append a chunk (binary- or iolist-style) of data to a file + with Prefix and also request an additional Extra bytes.
checksum_list/3Fetch the list of chunk checksums for File.
checksum_list/4Fetch the list of chunk checksums for File.
connect/1
connected_p/1
delete_migration/3Restricted API: Delete a file after it has been successfully + migrated.
delete_migration/4Restricted API: Delete a file after it has been successfully + migrated.
disconnect/1
get_all_projections/2Get all projections from the FLU's projection store.
get_all_projections/3Get all projections from the FLU's projection store.
get_latest_epoch/2Get the latest epoch number + checksum from the FLU's projection store.
get_latest_epoch/3Get the latest epoch number + checksum from the FLU's projection store.
list_all_projections/2Get all epoch numbers from the FLU's projection store.
list_all_projections/3Get all epoch numbers from the FLU's projection store.
list_files/2Fetch the list of all files on the remote FLU.
list_files/3Fetch the list of all files on the remote FLU.
quit/1Quit & close the connection to remote FLU.
read_chunk/5Read a chunk of data of size Size from File at Offset.
read_chunk/6Read a chunk of data of size Size from File at Offset.
read_latest_projection/2Get the latest projection from the FLU's projection store for ProjType
read_latest_projection/3Get the latest projection from the FLU's projection store for ProjType
read_projection/3Read a projection Proj of type ProjType.
read_projection/4Read a projection Proj of type ProjType.
trunc_hack/3Restricted API: Truncate a file after it has been successfully + erasure coded.
trunc_hack/4Restricted API: Truncate a file after it has been successfully + erasure coded.
wedge_status/1Fetch the wedge status from the remote FLU.
wedge_status/2Fetch the wedge status from the remote FLU.
write_chunk/5Restricted API: Write a chunk of already-sequenced data to + File at Offset.
write_chunk/6Restricted API: Write a chunk of already-sequenced data to + File at Offset.
write_projection/3Write a projection Proj of type ProjType.
write_projection/4Write a projection Proj of type ProjType.
+ +

Function Details

+ +

append_chunk/4

+
+

append_chunk(Sock::port_wrap(), EpochID::epoch_id(), Prefix::file_prefix(), Chunk::chunk()) -> {ok, chunk_pos()} | {error, error_general()} | {error, term()}

+

Append a chunk (binary- or iolist-style) of data to a file + with Prefix.

+ +

append_chunk/5

+
+

append_chunk(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), Prefix::file_prefix(), Chunk::chunk()) -> {ok, chunk_pos()} | {error, error_general()} | {error, term()}

+

Append a chunk (binary- or iolist-style) of data to a file + with Prefix.

+ +

append_chunk_extra/5

+
+

append_chunk_extra(Yessir::port_wrap(), EpochID::epoch_id(), Prefix::file_prefix(), Chunk::chunk(), ChunkExtra::chunk_size()) -> {ok, chunk_pos()} | {error, error_general()} | {error, term()}

+

Append a chunk (binary- or iolist-style) of data to a file + with Prefix and also request an additional Extra bytes.

+ + For example, if the Chunk size is 1 KByte and Extra is 4K Bytes, then + the file offsets that follow Chunk's position for the following 4K will + be reserved by the file sequencer for later write(s) by the + write_chunk() API.

+ +

append_chunk_extra/6

+
+

append_chunk_extra(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), Prefix::file_prefix(), Chunk::chunk(), ChunkExtra::chunk_size()) -> {ok, chunk_pos()} | {error, error_general()} | {error, term()}

+

Append a chunk (binary- or iolist-style) of data to a file + with Prefix and also request an additional Extra bytes.

+ + For example, if the Chunk size is 1 KByte and Extra is 4K Bytes, then + the file offsets that follow Chunk's position for the following 4K will + be reserved by the file sequencer for later write(s) by the + write_chunk() API.

+ +

checksum_list/3

+
+

checksum_list(Yessir::port_wrap(), EpochID::epoch_id(), File::file_name()) -> {ok, [chunk_csum()]} | {error, error_general() | no_such_file | partial_read} | {error, term()}

+

Fetch the list of chunk checksums for File.

+ +

checksum_list/4

+
+

checksum_list(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name()) -> {ok, [chunk_csum()]} | {error, error_general() | no_such_file} | {error, term()}

+

Fetch the list of chunk checksums for File.

+ +

connect/1

+
+

connect(P_srvr) -> any()

+
+ +

connected_p/1

+
+

connected_p(X1) -> any()

+
+ +

delete_migration/3

+
+

delete_migration(Yessir::port_wrap(), EpochID::epoch_id(), File::file_name()) -> ok | {error, error_general() | no_such_file} | {error, term()}

+

Restricted API: Delete a file after it has been successfully + migrated.

+ +

delete_migration/4

+
+

delete_migration(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name()) -> ok | {error, error_general() | no_such_file} | {error, term()}

+

Restricted API: Delete a file after it has been successfully + migrated.

+ +

disconnect/1

+
+

disconnect(Yessir) -> any()

+
+ +

get_all_projections/2

+
+

get_all_projections(Yessir::port_wrap(), ProjType::projection_type()) -> {ok, [projection()]} | {error, term()}

+

Get all projections from the FLU's projection store.

+ +

get_all_projections/3

+
+

get_all_projections(Host::inet_host(), TcpPort::inet_port(), ProjType::projection_type()) -> {ok, [projection()]} | {error, term()}

+

Get all projections from the FLU's projection store.

+ +

get_latest_epoch/2

+
+

get_latest_epoch(Sock::port_wrap(), ProjType::projection_type()) -> {ok, epoch_id()} | {error, term()}

+

Get the latest epoch number + checksum from the FLU's projection store.

+ +

get_latest_epoch/3

+
+

get_latest_epoch(Host::inet_host(), TcpPort::inet_port(), ProjType::projection_type()) -> {ok, epoch_id()} | {error, term()}

+

Get the latest epoch number + checksum from the FLU's projection store.

+ +

list_all_projections/2

+
+

list_all_projections(Sock::port_wrap(), ProjType::projection_type()) -> {ok, [non_neg_integer()]} | {error, term()}

+

Get all epoch numbers from the FLU's projection store.

+ +

list_all_projections/3

+
+

list_all_projections(Host::inet_host(), TcpPort::inet_port(), ProjType::projection_type()) -> {ok, [non_neg_integer()]} | {error, term()}

+

Get all epoch numbers from the FLU's projection store.

+ +

list_files/2

+
+

list_files(Yessir::port_wrap(), EpochID::epoch_id()) -> {ok, [file_info()]} | {error, term()}

+

Fetch the list of all files on the remote FLU.

+ +

list_files/3

+
+

list_files(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id()) -> {ok, [file_info()]} | {error, term()}

+

Fetch the list of all files on the remote FLU.

+ +

quit/1

+
+

quit(X1::port_wrap()) -> ok

+

Quit & close the connection to remote FLU.

+ +

read_chunk/5

+
+

read_chunk(Yessir::port_wrap(), EpochID::epoch_id(), File::file_name(), Offset::file_offset(), Size::chunk_size()) -> {ok, chunk_s()} | {error, error_general() | no_such_file | partial_read} | {error, term()}

+

Read a chunk of data of size Size from File at Offset.

+ +

read_chunk/6

+
+

read_chunk(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name(), Offset::file_offset(), Size::chunk_size()) -> {ok, chunk_s()} | {error, error_general() | no_such_file | partial_read} | {error, term()}

+

Read a chunk of data of size Size from File at Offset.

+ +

read_latest_projection/2

+
+

read_latest_projection(Yessir::port_wrap(), ProjType::projection_type()) -> {ok, projection()} | {error, not_written} | {error, term()}

+

Get the latest projection from the FLU's projection store for ProjType

+ +

read_latest_projection/3

+
+

read_latest_projection(Host::inet_host(), TcpPort::inet_port(), ProjType::projection_type()) -> {ok, projection()} | {error, not_written} | {error, term()}

+

Get the latest projection from the FLU's projection store for ProjType

+ +

read_projection/3

+
+

read_projection(Yessir::port_wrap(), ProjType::projection_type(), Epoch::epoch_num()) -> {ok, projection()} | {error, not_written} | {error, term()}

+

Read a projection Proj of type ProjType.

+ +

read_projection/4

+
+

read_projection(Host::inet_host(), TcpPort::inet_port(), ProjType::projection_type(), Epoch::epoch_num()) -> {ok, projection()} | {error, written} | {error, term()}

+

Read a projection Proj of type ProjType.

+ +

trunc_hack/3

+
+

trunc_hack(Yessir::port_wrap(), EpochID::epoch_id(), File::file_name()) -> ok | {error, error_general() | no_such_file} | {error, term()}

+

Restricted API: Truncate a file after it has been successfully + erasure coded.

+ +

trunc_hack/4

+
+

trunc_hack(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name()) -> ok | {error, error_general() | no_such_file} | {error, term()}

+

Restricted API: Truncate a file after it has been successfully + erasure coded.

+ +

wedge_status/1

+
+

wedge_status(Sock::port_wrap()) -> {ok, {boolean(), pv1_epoch()}} | {error, term()}

+

Fetch the wedge status from the remote FLU.

+ +

wedge_status/2

+
+

wedge_status(Host::inet_host(), TcpPort::inet_port()) -> {ok, {boolean(), pv1_epoch()}} | {error, term()}

+

Fetch the wedge status from the remote FLU.

+ +

write_chunk/5

+
+

write_chunk(Yessir::port_wrap(), EpochID::epoch_id(), File::file_name(), Offset::file_offset(), Chunk::chunk()) -> ok | {error, error_general()} | {error, term()}

+

Restricted API: Write a chunk of already-sequenced data to + File at Offset.

+ +

write_chunk/6

+
+

write_chunk(Host::inet_host(), TcpPort::inet_port(), EpochID::epoch_id(), File::file_name(), Offset::file_offset(), Chunk::chunk()) -> ok | {error, error_general()} | {error, term()}

+

Restricted API: Write a chunk of already-sequenced data to + File at Offset.

+ +

write_projection/3

+
+

write_projection(Yessir::port_wrap(), ProjType::projection_type(), Proj::projection()) -> ok | {error, written} | {error, term()}

+

Write a projection Proj of type ProjType.

+ +

write_projection/4

+
+

write_projection(Host::inet_host(), TcpPort::inet_port(), ProjType::projection_type(), Proj::projection()) -> ok | {error, written} | {error, term()}

+

Write a projection Proj of type ProjType.

+
+ + +

Generated by EDoc, May 20 2015, 11:11:34.

+ + diff --git a/edoc/modules-frame.html b/edoc/modules-frame.html index fbe4efc..b9e8842 100644 --- a/edoc/modules-frame.html +++ b/edoc/modules-frame.html @@ -10,15 +10,19 @@ machi_admin_util machi_app machi_chain_manager1 +machi_chain_repair machi_chash +machi_cr_client machi_flu1 machi_flu1_client +machi_flu_psup machi_flu_sup machi_projection machi_projection_store machi_proxy_flu1_client machi_sequencer machi_sup -machi_util +machi_util +machi_yessir_client \ No newline at end of file diff --git a/edoc/overview-summary.html b/edoc/overview-summary.html index a29913c..43c0343 100644 --- a/edoc/overview-summary.html +++ b/edoc/overview-summary.html @@ -180,6 +180,6 @@ the code, is a reminder signal of unfinished work.


-

Generated by EDoc, Apr 8 2015, 17:31:11.

+

Generated by EDoc, May 20 2015, 11:11:34.