Skip to content

Commit

Permalink
Revert "Merge remote-tracking branch 'origin/master'"
Browse files Browse the repository at this point in the history
This reverts commit dd50843, reversing
changes made to 7c396ef.
  • Loading branch information
alparslanavci committed Dec 31, 2015
1 parent 3ae0354 commit 9d72f83
Show file tree
Hide file tree
Showing 190 changed files with 728 additions and 2,378 deletions.
7 changes: 5 additions & 2 deletions cluster-quorum/pom.xml
Expand Up @@ -4,6 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>


<artifactId>cluster-quorum</artifactId>
<name>Cluster Quorum</name>
<version>0.1-SNAPSHOT</version>
Expand All @@ -18,8 +19,10 @@
<dependencies>
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast</artifactId>
<artifactId>hazelcast-all</artifactId>
<version>${hazelcast.version}</version>
</dependency>
</dependencies>
</project>


</project>
25 changes: 0 additions & 25 deletions cluster/pom.xml

This file was deleted.

40 changes: 0 additions & 40 deletions cluster/src/main/java/ClusterFrozenState.java

This file was deleted.

46 changes: 0 additions & 46 deletions cluster/src/main/java/ClusterPassiveState.java

This file was deleted.

19 changes: 0 additions & 19 deletions cluster/src/main/java/ClusterShutdown.java

This file was deleted.

@@ -1,6 +1,6 @@
<hazelcast xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.hazelcast.com/schema/config
http://www.hazelcast.com/schema/config/hazelcast-config-3.6.xsd"
http://www.hazelcast.com/schema/config/hazelcast-config-3.2.xsd"
xmlns="http://www.hazelcast.com/schema/config">

<network>
Expand All @@ -13,4 +13,4 @@
<max-size>10</max-size>
</queue>

</hazelcast>
</hazelcast>
@@ -1,9 +1,11 @@
<hazelcast xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.hazelcast.com/schema/config
http://www.hazelcast.com/schema/config/hazelcast-config-3.6.xsd"
http://www.hazelcast.com/schema/config/hazelcast-config-3.2.xsd"
xmlns="http://www.hazelcast.com/schema/config">

<!-- we need to configure the queue store here -->
<queue name="queue">

</queue>
</hazelcast>

</hazelcast>
@@ -1,6 +1,6 @@
<hazelcast xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.hazelcast.com/schema/config
http://www.hazelcast.com/schema/config/hazelcast-config-3.6.xsd"
http://www.hazelcast.com/schema/config/hazelcast-config-3.5.xsd"
xmlns="http://www.hazelcast.com/schema/config">

<network>
Expand All @@ -14,4 +14,4 @@
<time-to-live-seconds>5</time-to-live-seconds>
</ringbuffer>

</hazelcast>
</hazelcast>
@@ -1,7 +1,6 @@
import java.io.Serializable;

public class EchoTask implements Runnable, Serializable {

private final String msg;

public EchoTask(String msg) {
Expand All @@ -12,9 +11,7 @@ public void run() {
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}

System.out.println("Echo: " + msg);
System.out.println("Echo:" + msg);
}
}
Expand Up @@ -3,15 +3,13 @@
import com.hazelcast.core.IExecutorService;

public class MasterMember {

public static void main(String[] args) throws Exception {
HazelcastInstance hz = Hazelcast.newHazelcastInstance();
IExecutorService executor = hz.getExecutorService("executor");

for (int i = 1; i <= 1; i++) {
for (int k = 1; k <= 1; k++) {
Thread.sleep(1000);
System.out.println("Producing echo task: " + i);
executor.execute(new EchoTask("" + i));
System.out.println("Producing echo task: " + k);
executor.execute(new EchoTask("" + k));
}
System.out.println("MasterMember finished!");

Expand Down
Expand Up @@ -8,20 +8,16 @@
import java.util.concurrent.Future;

public class MasterMember {

public static void main(String[] args) throws Exception {
HazelcastInstance hz = Hazelcast.newHazelcastInstance();
Map<String, Integer> map = hz.getMap("map");
for (int i = 0; i < 5; i++) {
for (int k = 0; k < 5; k++)
map.put(UUID.randomUUID().toString(), 1);
}
IExecutorService executor = hz.getExecutorService("executor");

Map<Member, Future<Integer>> result = executor.submitToAllMembers(new SumTask());
int sum = 0;
for (Future<Integer> future : result.values()) {
for (Future<Integer> future : result.values())
sum += future.get();
}

System.out.println("Result: " + sum);
}
Expand Down
@@ -1,7 +1,6 @@
import com.hazelcast.core.Hazelcast;

public class SlaveMember {

public static void main(String[] args) {
Hazelcast.newHazelcastInstance();
}
Expand Down
Expand Up @@ -5,8 +5,8 @@
import java.io.Serializable;
import java.util.concurrent.Callable;

public class SumTask implements Callable<Integer>, Serializable, HazelcastInstanceAware {

public class SumTask implements
Callable<Integer>, Serializable, HazelcastInstanceAware {
private transient HazelcastInstance hz;

public void setHazelcastInstance(HazelcastInstance hz) {
Expand All @@ -20,7 +20,7 @@ public Integer call() throws Exception {
System.out.println("Calculating for key: " + key);
result += map.get(key);
}
System.out.println("Local result: " + result);
System.out.println("Local Result: " + result);
return result;
}
}
Expand Up @@ -6,17 +6,13 @@
import java.util.UUID;

public class MasterMember {

public static void main(String[] args) throws Exception {
HazelcastInstance hz = Hazelcast.newHazelcastInstance();
Map<String, String> map = hz.getMap("map");
for (int i = 0; i < 10; i++) {
for (int k = 0; k < 10; k++)
map.put(UUID.randomUUID().toString(), "");
}

IExecutorService executor = hz.getExecutorService("executor");
for (String key : map.keySet()) {
for (String key : map.keySet())
executor.executeOnKeyOwner(new VerifyTask(key), key);
}
}
}
@@ -1,7 +1,6 @@
import com.hazelcast.core.Hazelcast;

public class SlaveMember {

public static void main(String[] args) {
Hazelcast.newHazelcastInstance();
}
Expand Down
Expand Up @@ -5,7 +5,6 @@
import java.io.Serializable;

public class VerifyTask implements Runnable, Serializable, HazelcastInstanceAware {

private final String key;
private transient HazelcastInstance hz;

Expand All @@ -20,6 +19,6 @@ public void setHazelcastInstance(HazelcastInstance hz) {
public void run() {
IMap map = hz.getMap("map");
boolean localKey = map.localKeySet().contains(key);
System.out.println("Key " + key + " is local: " + localKey);
System.out.println("Key is local:" + localKey);
}
}
Expand Up @@ -4,8 +4,8 @@
import java.io.Serializable;
import java.util.concurrent.Callable;

public class ComputationHeavyTask implements Callable<Integer>, Serializable, HazelcastInstanceAware {

public class ComputationHeavyTask implements
Callable<Integer>, Serializable, HazelcastInstanceAware {
private transient HazelcastInstance hz;

public void setHazelcastInstance(HazelcastInstance hz) {
Expand Down
Expand Up @@ -6,13 +6,10 @@
import java.util.concurrent.Future;

public class StartDataMember {

public static void main(String[] args) throws Exception {
HazelcastInstance hz = Hazelcast.newHazelcastInstance();
IExecutorService executor = hz.getExecutorService("executor");

Future<Integer> future = executor.submit(new ComputationHeavyTask(), MemberSelectors.LITE_MEMBER_SELECTOR);

final HazelcastInstance hz = Hazelcast.newHazelcastInstance();
final IExecutorService executor = hz.getExecutorService("executor");
final Future<Integer> future = executor.submit(new ComputationHeavyTask(), MemberSelectors.LITE_MEMBER_SELECTOR);
System.out.println("Result: " + future.get());
}
}
Expand Up @@ -2,11 +2,9 @@
import com.hazelcast.core.Hazelcast;

public class StartLiteMember {

public static void main(String[] args) {
Config config = new Config();
final Config config = new Config();
config.setLiteMember(true);

Hazelcast.newHazelcastInstance(config);
}
}
Expand Up @@ -8,6 +8,6 @@ public EchoTask(String msg) {
}

public void run() {
System.out.println("Echo: " + msg);
System.out.println(msg);
}
}
Expand Up @@ -4,13 +4,11 @@
import com.hazelcast.core.Member;

public class MasterMember {

public static void main(String[] args) {
HazelcastInstance hz = Hazelcast.newHazelcastInstance();
IExecutorService executorService = hz.getExecutorService("executor");

for (Member member : hz.getCluster().getMembers()) {
EchoTask task = new EchoTask(member.getSocketAddress().toString());
EchoTask task = new EchoTask("echo" + member.getSocketAddress());
executorService.executeOnMember(task, member);
}
}
Expand Down

0 comments on commit 9d72f83

Please sign in to comment.