- 本章では分散処理におけるイベント中の時刻、ローカル状態、グローバル状態の関連について記述する。
- 一貫性とは分散実行環境における時刻同期システムのやり取りからから生じた因果関係によって生成される時刻のことを指す。
- 分散実行において興味深い見方として、前章で説明された通り、因果関係とはイベントの因果関係の優先順位であるということがある(
->ev
) - ローカル状態の因果関係の優先順位を(
->σ
) - グローバル状態の格子内の到達可能性の関係(
->Σ
)
- 分散実行において興味深い見方として、前章で説明された通り、因果関係とはイベントの因果関係の優先順位であるということがある(
- 上記の全ケースにおいて、時刻の"起源"はそれによって引き起こされる"作用"よりも発生するという関係がある。
- time-freeな非同期分散システムを考えるにあたり、ここでいう時刻は「物理的な時刻」にはなりえない。
- (プロセスはグローバルな物理クロックへアクセス可能であったとしてもクロック精度は一貫性確認を可能とするために十分に小さくなければならない。)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package stormmon.sample; | |
import java.util.Map; | |
import backtype.storm.Config; | |
import backtype.storm.LocalCluster; | |
import backtype.storm.task.OutputCollector; | |
import backtype.storm.task.TopologyContext; | |
import backtype.storm.testing.TestWordSpout; | |
import backtype.storm.topology.OutputFieldsDeclarer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos | |
RUN yum install -y passwd | |
RUN yum install -y openssh | |
RUN yum install -y openssh-server | |
RUN yum install -y openssh-clients | |
RUN yum install -y sudo | |
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config | |
RUN sed -ri 's/#UsePAM no/UsePAM no/g' /etc/ssh/sshd_config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.eclipse.paho.client.mqttv3.{MqttMessage, MqttConnectOptions, MqttClient} | |
/** MQTT Publish Test Class */ | |
object MqttPublisher { | |
def main(args: Array[String]) { | |
// Connect Target | |
val brokerURI:String = "ssl://******.iot.ap-northeast-1.amazonaws.com:8883" | |
// SocketFactoryGenerate | |
val socketFactory = SocketFactoryGenerator.generateFromFilePath("/etc/cert/rootCA.pem", "/etc/cert/cert.pem", "/etc/cert/private.pem", "password") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.eclipse.paho.client.mqttv3.{MqttClient, MqttConnectOptions} | |
/** MQTT Subscribe Test Class */ | |
object MqttSubscriber { | |
def main(args: Array[String]) { | |
// Connect Target | |
val brokerURI:String = "ssl://******.iot.ap-northeast-1.amazonaws.com:8883" | |
// SocketFactoryGenerate | |
val socketFactory = SocketFactoryGenerator.generateFromFilePath("/etc/cert/rootCA.pem", "/etc/cert/cert.pem", "/etc/cert/private.pem") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.gearpump.streaming.examples.wordcount | |
import java.util.concurrent.TimeUnit | |
import io.gearpump.streaming.task.{StartTime, Task, TaskContext} | |
import io.gearpump.Message | |
import io.gearpump.cluster.UserConfig | |
class Split(taskContext : TaskContext, conf: UserConfig) extends Task(taskContext, conf) { | |
import taskContext.{output, self} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ wget http://ftp.tsukuba.wide.ad.jp/software/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz | |
$ tar xvzf apache-maven-3.3.9-bin.tar.gz | |
$ mv apache-maven-3.3.9 /opt/ | |
$ ln -s /opt/apache-maven-3.3.9 /opt/apache-maven | |
$ echo "export MAVEN_HOME=/opt/apache-maven" >> ~/.bashrc | |
$ echo -e 'export PATH=${PATH}:${MAVEN_HOME}/bin' >> ~/.bashrc | |
$ source ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/opt/pig/bin/pig -x tez -f test-lzo-count.pig | |
2016-04-24 20:13:44,815 [main] INFO org.apache.pig.tools.pigstats.tez.TezPigScriptStats - Script Statistics: | |
HadoopVersion: 2.6.0-cdh5.7.0 | |
PigVersion: 0.15.0 | |
TezVersion: 0.7.0 | |
UserId: build | |
FileName: test-lzo-count.pig | |
StartedAt: 2016-04-24 20:13:26 | |
FinishedAt: 2016-04-24 20:13:44 |
OlderNewer