Package org.apache.blur

Examples of org.apache.blur.BlurConfiguration


  }

  public static synchronized BlurConfiguration getSystemBlurConfiguration() {
    if (_systemBlurConfiguration == null) {
      try {
        _systemBlurConfiguration = new BlurConfiguration();
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
    }
    return _systemBlurConfiguration.clone();
View Full Code Here


      throw new CommandException("Invalid args: " + help());
    }
    ZooKeeper zooKeeper = null;
    try {
      try {
        BlurConfiguration configuration = new BlurConfiguration();
        String connectString = configuration.get(BlurConstants.BLUR_ZOOKEEPER_CONNECTION);
        int sessionTimeout = configuration.getInt(BlurConstants.BLUR_ZOOKEEPER_TIMEOUT, 30000);
        zooKeeper = new ZooKeeper(connectString, sessionTimeout, new Watcher() {
          @Override
          public void process(WatchedEvent event) {

          }
View Full Code Here

      AtomicInteger writesWaiting) {
    _queue = queue;
    _blurIndex = blurIndex;
    _context = context;
    TableContext tableContext = _context.getTableContext();
    BlurConfiguration blurConfiguration = tableContext.getBlurConfiguration();

    _maxQueueBatch = blurConfiguration.getInt(BLUR_SHARD_QUEUE_MAX_QUEUE_BATCH_SIZE, 100);
    _maxProcessingTime = TimeUnit.MILLISECONDS.toNanos(blurConfiguration.getInt(BLUR_SHARD_QUEUE_MAX_WRITER_LOCK_TIME,
        5000));
    _timeInMsThatQueueWritesPauseWhenEmpty = blurConfiguration
        .getLong(BLUR_SHARD_QUEUE_MAX_PAUSE_TIME_WHEN_EMPTY, 1000);
    _writesWaiting = writesWaiting;
  }
View Full Code Here

  public void testBlurIndexWriter() throws IOException {
    setupWriter(_configuration);
    long s = System.nanoTime();
    int total = 0;
    TraceStorage oldStorage = Trace.getStorage();
    Trace.setStorage(new BaseTraceStorage(new BlurConfiguration()) {
      @Override
      public void close() throws IOException {

      }
View Full Code Here

    }
  }

  public static void main(String[] args) throws Throwable {

    Trace.setStorage(new LogTraceStorage(new BlurConfiguration()));

    args = removeLeadingShellFromScript(args);

    setupCommands();
View Full Code Here

    _conf.setMergeScheduler(mergeScheduler.getMergeScheduler());
    _snapshotIndexDeletionPolicy = new SnapshotIndexDeletionPolicy(_tableContext.getConfiguration(), new Path(
        shardContext.getHdfsDirPath(), "generations"));
    _policy = new IndexDeletionPolicyReader(_snapshotIndexDeletionPolicy);
    _conf.setIndexDeletionPolicy(_policy);
    BlurConfiguration blurConfiguration = _tableContext.getBlurConfiguration();
    _queue = new ArrayBlockingQueue<RowMutation>(blurConfiguration.getInt(BLUR_SHARD_QUEUE_MAX_INMEMORY_LENGTH, 100));
    _mutationQueueProcessor = new MutationQueueProcessor(_queue, this, _shardContext, _writesWaiting);

    if (!DirectoryReader.indexExists(directory)) {
      new BlurIndexWriter(directory, _conf).close();
    }
View Full Code Here

  }

  @Test
  public void testFacetQueryPerformance1() throws IOException, InterruptedException {
    System.out.println("testFacetQueryPerformance1");
    BlurConfiguration configuration = new BlurConfiguration();
    Trace.setStorage(new LogTraceStorage(configuration));
    int facetCount = 200;
    int docCount = 1000000;
    IndexReader reader = createIndex(docCount, facetCount, false);
View Full Code Here

  }

  @Test
  public void testFacetQueryPerformance2() throws IOException, InterruptedException {
    System.out.println("testFacetQueryPerformance2");
    BlurConfiguration configuration = new BlurConfiguration();
    Trace.setStorage(new LogTraceStorage(configuration));
    int facetCount = 200;
    int docCount = 1000000;
    IndexReader reader = createIndex(docCount, facetCount, false);
View Full Code Here

  public static void main(String[] args) throws Exception {
    try {
      int serverIndex = getServerIndex(args);
      LOG.info("Setting up Shard Server");
      Thread.setDefaultUncaughtExceptionHandler(new SimpleUncaughtExceptionHandler());
      BlurConfiguration configuration = new BlurConfiguration();
      printUlimits();
      ReporterSetup.setupReporters(configuration);
      MemoryReporter.enable();
      setupJvmMetrics();
      // make this configurable
View Full Code Here

    assertEquals(8080, Config.getConsolePort());
  }

  @Test
  public void testGetBlurConfig() {
    BlurConfiguration blurConfig = Config.getBlurConfig();
    assertNotNull(blurConfig);
  }
View Full Code Here

TOP

Related Classes of org.apache.blur.BlurConfiguration

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.