Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
use dlog-daemon.sh to start writeproxy, use the newly created my_name…
Browse files Browse the repository at this point in the history
…space to write logs. (#22)
  • Loading branch information
yjshen authored and sijie committed May 17, 2016
1 parent 271c2b7 commit 7310964
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ lib/
*~
*#*#
*.#*
dist/
logs/
2 changes: 1 addition & 1 deletion distributedlog-service/bin/dlog-daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fi

# DLOG logging configuration
DLOG_LOG_DIR=${DLOG_LOG_DIR:-"$DL_HOME/logs"}
DLOG_ROOT_LOGGER=${DLOG_ROOT_LOGGER:-'INFO,ROLLINGFILE'}
DLOG_ROOT_LOGGER=${DLOG_ROOT_LOGGER:-'INFO,R'}
# Process Control Parameters
DLOG_STOP_TIMEOUT=${DLOG_STOP_TIMEOUT:-30}
DLOG_PID_DIR=${DLOG_PID_DIR:-$DL_HOME/pids}
Expand Down
2 changes: 1 addition & 1 deletion docs/basics/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Namespaces
The *log streams* belong to same organization are usually categorized and managed under
a **namespace**. A DL **namespace** is basically for applications to locate where the
*log streams* are. Applications could *create* and *delete* streams under a namespace,
and also be able to *truncate* a stream to given sequence number (either *DLSN* *TransactionID*).
and also be able to *truncate* a stream to given sequence number (either *DLSN* or *TransactionID*).

Writers
-------
Expand Down
12 changes: 6 additions & 6 deletions docs/basics/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ Let's create 5 log streams, prefixed with `messaging-test-`.

::

> ./distributedlog-service/bin/dlog tool create -u distributedlog://127.0.0.1:7000/messaging/distributedlog -r messaging-stream- -e 1-5
> ./distributedlog-service/bin/dlog tool create -u distributedlog://127.0.0.1:7000/messaging/my_namespace -r messaging-stream- -e 1-5


We can now see the streams if we run the `list` command from the tool.

::
> ./distributedlog-service/bin/dlog tool list -u distributedlog://127.0.0.1:7000/messaging/distributedlog
Streams under distributedlog://127.0.0.1:7000/messaging/distributedlog :
> ./distributedlog-service/bin/dlog tool list -u distributedlog://127.0.0.1:7000/messaging/my_namespace
Streams under distributedlog://127.0.0.1:7000/messaging/my_namespace :
--------------------------------
messaging-stream-1
messaging-stream-3
Expand All @@ -74,11 +74,11 @@ We can now see the streams if we run the `list` command from the tool.
Step 5: Start a write proxy
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Now, lets start a write proxy server that serves writes to distributedlog namespace `distributedlog://127.0.0.1/messaging/distributedlog`. The server listens on 8000 to accept fan-in write requests.
Now, lets start a write proxy server that serves writes to distributedlog namespace `distributedlog://127.0.0.1/messaging/my_namespace`. The server listens on 8000 to accept fan-in write requests.

::
> ./distributedlog-service/bin/dlog com.twitter.distributedlog.service.DistributedLogServerApp -p 8000 --shard-id 1 -sp 8001 -u distributedlog://127.0.0.1:7000/messaging/distributedlog -mx -c ${DL_HOME}/distributedlog-service/conf/distributedlog_proxy.conf
> ./distributedlog-service/bin/dlog-daemon.sh start writeproxy -p 8000 --shard-id 1 -sp 8001 -u distributedlog://127.0.0.1:7000/messaging/my_namespace -mx -c `pwd`/distributedlog-service/conf/distributedlog_proxy.conf


Step 6: Tail reading records
Expand All @@ -88,7 +88,7 @@ The distributedlog tutorial has a multi-streams reader that will dump out receiv

::
> ./distributedlog-tutorials/distributedlog-basic/bin/runner run com.twitter.distributedlog.basic.MultiReader distributedlog://127.0.0.1:7000/messaging/distributedlog messaging-stream-1,messaging-stream-2,messaging-stream-3,messaging-stream-4,messaging-stream-5
> ./distributedlog-tutorials/distributedlog-basic/bin/runner run com.twitter.distributedlog.basic.MultiReader distributedlog://127.0.0.1:7000/messaging/my_namespace messaging-stream-1,messaging-stream-2,messaging-stream-3,messaging-stream-4,messaging-stream-5


Step 7: Write some records
Expand Down

0 comments on commit 7310964

Please sign in to comment.