This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <beans xmlns="http://www.springframework.org/schema/beans" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xmlns:context="http://www.springframework.org/schema/context" | |
| xmlns:mongo="http://www.springframework.org/schema/data/mongo" | |
| xmlns:hz="http://www.hazelcast.com/schema/spring" | |
| xsi:schemaLocation= | |
| "http://www.springframework.org/schema/context | |
| http://www.springframework.org/schema/context/spring-context-3.0.xsd | |
| http://www.springframework.org/schema/data/mongo |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 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> | |
| <groupId>HazelMongo</groupId> | |
| <artifactId>HazelMongo</artifactId> | |
| <version>1.0</version> | |
| <dependencies> | |
| <dependency> |
This file contains hidden or 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 com.hazelcast.hbase; | |
| import com.hazelcast.core.Hazelcast; | |
| import com.hazelcast.core.IMap; | |
| public class Main { | |
| public static void main(String[] args) { | |
| IMap<String, User> map = Hazelcast.getMap("map"); | |
| System.out.println( map.get("user-6") ); | |
| User user = new User(); |
This file contains hidden or 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 com.hazelcast.hbase; | |
| import org.apache.hadoop.hbase.client.HTable; | |
| import java.io.IOException; | |
| public class HBaseService { | |
| private static HBaseService ourInstance = new HBaseService(); | |
| private HTable htable; |
This file contains hidden or 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 com.hazelcast.hbase; | |
| import com.hazelcast.core.MapStore; | |
| import org.apache.hadoop.hbase.KeyValue; | |
| import org.apache.hadoop.hbase.client.*; | |
| import org.apache.hadoop.hbase.util.Bytes; | |
| import java.io.IOException; | |
| import java.util.*; | |
| import java.util.logging.Logger; |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-2.1.xsd" | |
| xmlns="http://www.hazelcast.com/schema/config" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
| <group> | |
| <name>dev</name> | |
| <password>dev-pass</password> | |
| </group> | |
| <management-center enabled="false">http://localhost:8080/mancenter</management-center> | |
| <network> |
This file contains hidden or 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 com.hazelcast.hbase; | |
| import java.io.Serializable; | |
| public class User implements Serializable { | |
| private String name; | |
| private String location; | |
| private Integer age; | |
| private String details; |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 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>hazelcast_hbase</artifactId> | |
| <dependencies> |
This file contains hidden or 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 com.springhazelcast; | |
| import com.hazelcast.core.IMap; | |
| import org.springframework.context.ApplicationContext; | |
| import org.springframework.context.support.GenericXmlApplicationContext; | |
| public class Main { | |
| public static void main(String[] args) { | |
| ApplicationContext ctx = new GenericXmlApplicationContext("beans.xml"); |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <beans xmlns="http://www.springframework.org/schema/beans" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xmlns:context="http://www.springframework.org/schema/context" | |
| xmlns:hz="http://www.hazelcast.com/schema/spring" | |
| xsi:schemaLocation= | |
| "http://www.springframework.org/schema/context | |
| http://www.springframework.org/schema/context/spring-context-3.0.xsd | |
| http://www.springframework.org/schema/beans | |
| http://www.springframework.org/schema/beans/spring-beans-3.0.xsd |