Package org.apache.blur.server

Examples of org.apache.blur.server.ShardContext


    Directory directory = new HdfsDirectory(_configuration, hdfsDirPath);
    directory.setLockFactory(lockFactory);

    TableDescriptor descriptor = _clusterStatus.getTableDescriptor(true, _cluster, table);
    TableContext tableContext = TableContext.create(descriptor);
    ShardContext shardContext = ShardContext.create(tableContext, shard);

    Directory dir;
    boolean blockCacheEnabled = _clusterStatus.isBlockCacheEnabled(_cluster, table);
    if (blockCacheEnabled) {
      Set<String> blockCacheFileTypes = _clusterStatus.getBlockCacheFileTypes(_cluster, table);
View Full Code Here


    }
    throw new IOException("Table [" + table + "] not found.");
  }

  private BlurIndex openIndex(String table, String shard, Directory dir) throws CorruptIndexException, IOException {
    ShardContext shardContext = ShardContext.create(_tableContext, shard);
    BlurNRTIndex index = new BlurNRTIndex(shardContext, _mergeScheduler, _indexInputCloser, dir, _gc, _searchExecutor);
    return index;
  }
View Full Code Here

    System.out.println("tableUri=" + tableUri);
    tableDescriptor.setTableUri(tableUri);

    TableContext tableContext = TableContext.create(tableDescriptor);
    ShardContext shardContext = ShardContext.create(tableContext, "shard-1");
    TransactionRecorder transactionRecorder = new TransactionRecorder(shardContext);
    closeThis.add(transactionRecorder);
    transactionRecorder.open();

    try {
View Full Code Here

   
    tableDescriptor.setTableUri(new Path(base, "table-table").toUri().toString());
    tableDescriptor.setShardCount(2);
   
    TableContext tableContext = TableContext.create(tableDescriptor);
    ShardContext shardContext = ShardContext.create(tableContext, "shard-00000000");
    Path tablePath = new Path(base, "table-table");
    Path shardPath = new Path(tablePath, "shard-00000000");
    String indexDirName = "index_" + uuid;
    path = new Path(shardPath, indexDirName + ".commit");
    fileSystem.mkdirs(path);
View Full Code Here

    tableDescriptor.putToTableProperties("blur.shard.time.between.commits", Long.toString(1000));

    TableContext tableContext = TableContext.create(tableDescriptor);
    directory = FSDirectory.open(new File(new URI(tableDescriptor.getTableUri())));

    ShardContext shardContext = ShardContext.create(tableContext, "test-shard");
    refresher = new BlurIndexRefresher();
    indexCloser = new BlurIndexCloser();
    refresher.init();
    indexCloser.init();
    reader = new BlurIndexReader(shardContext, directory, refresher, indexCloser);
View Full Code Here

    TableContext tableContext = TableContext.create(tableDescriptor);
    File path = new File(base, "index_" + uuid);
    path.mkdirs();
    FSDirectory directory = FSDirectory.open(path);
    ShardContext shardContext = ShardContext.create(tableContext, "test-shard-" + uuid);
    writer = new BlurNRTIndex(shardContext, mergeScheduler, closer, directory, gc, service);
  }
View Full Code Here

    tableDescriptor.setTableProperties(tableProperties);
    TableContext tableContext = TableContext.create(tableDescriptor);
    File path = new File(_base, "index_" + uuid);
    path.mkdirs();
    FSDirectory directory = FSDirectory.open(path);
    ShardContext shardContext = ShardContext.create(tableContext, "test-shard-" + uuid);
    _writer = new BlurIndexSimpleWriter(shardContext, directory, _mergeScheduler, _service, _closer, _indexWarmup);
  }
View Full Code Here

    tableDescriptor.setTableUri(new Path(_base, "table-table").toUri().toString());
    tableDescriptor.setShardCount(2);

    TableContext tableContext = TableContext.create(tableDescriptor);
    ShardContext shardContext = ShardContext.create(tableContext, "shard-00000000");
    Path tablePath = new Path(_base, "table-table");
    _shardPath = new Path(tablePath, "shard-00000000");
    String indexDirName = "index_" + uuid;
    _path = new Path(_shardPath, indexDirName + ".commit");
    _fileSystem.mkdirs(_path);
View Full Code Here

    TableContext.clear();
    TableDescriptor tableDescriptor = new TableDescriptor();
    tableDescriptor.setName("test");
    tableDescriptor.setTableUri(file.toURI().toString());
    TableContext tableContext = TableContext.create(tableDescriptor);
    ShardContext shardContext = ShardContext.create(tableContext, "test");
    _action = new MutatableAction(shardContext);
    _conf = new IndexWriterConfig(Version.LUCENE_43, new KeywordAnalyzer());
  }
View Full Code Here

      directory = new JoinDirectory(longTermStorage, shortTermStorage);
    } else {
      directory = longTermStorage;
    }

    ShardContext shardContext = ShardContext.create(tableContext, shard);

    TableDescriptor descriptor = tableContext.getDescriptor();
    boolean blockCacheEnabled = descriptor.isBlockCaching();
    if (blockCacheEnabled) {
      Set<String> blockCacheFileTypes = descriptor.getBlockCachingFileTypes();
View Full Code Here

TOP

Related Classes of org.apache.blur.server.ShardContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.