GithubHelp home page GithubHelp logo

titanmodelcreation's Introduction

TitanModel Creation In Java

This code will create 3 Titan Data Model for you, 1 data model is basic which use no indexing, 2 data model use indexing at screen_name and sub_category [CompositeIndex] and 3 data model is with reduce hops.

  1. Import gremlin_1 in Eclipse or any IDE.

  2. Add external jars, click on configure build path and add external jars
    jars : a. ooxml-schemas-1.0.jar b. poi-3.9.jar c. poi-ooxml-3.9.jar d. xmlbeans-2.6.0.jar e. all jars provided by Titan-1, go to lib folder to add all jars.

3 ) Set path of directory (export files from Neo4J :-XLS files) according to you in ReadExcel and ReadExcel1. At CreateDataModel, give path of Titan Database. Note all data properties are set for Tweet,User,Mentioned_User,HashTag and Url. For Help, check our XLS files in example. Check the directory whether all the files are created properly or not.

  1. Now open gremlin and Run this commands or you can change the file "titan-berkeleyje-es.properties" in conf if you want to use graph = TitanFactory.open(path/titan/conf/titan-berkeleyje-es.properties)

OR conf = new BaseConfiguration() conf.setProperty('storage.directory','/Users/prateek/Downloads/titan-1.0.0-hadoop1/db1') conf.setProperty('storage.batch-loading','true') conf.setProperty('storage.backend','berkeleyje') graph = TitanFactory.open(conf) now triversal : g = graph.traversal(standard()) g.E() .

Now check the documentation to do all queries : http://tinkerpop.apache.org/docs/3.0.1-incubating/#traversal

Note : Run datamodel one by one in CreateDataModel, as data use HeapMemory, might cause an exception. All edges from tweet are mapped with Mentioned_User,HashTag,Url and user and tweet are connected by screen_name. Used TitanVertex documentation API's for development, any changes might cause error, in reference you can check the API's Titan documentation for help. @Author : [email protected]

titanmodelcreation's People

Contributors

prateekgta avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.