Package com.orientechnologies.orient.core.db.tool

Examples of com.orientechnologies.orient.core.db.tool.ODatabaseCompare


    url = iURL;
    testPath = iTestPath;
  }

  public void testCompareDatabases() throws IOException {
    Assert.assertTrue(new ODatabaseCompare(url, "local:" + testPath + "/" + DbImportExportTest.NEW_DB_URL, this).compare());
  }
View Full Code Here


  @ConsoleCommand(description = "Compare two databases")
  public void compareDatabases(@ConsoleParameter(name = "db1-url", description = "URL of the first database") final String iDb1URL,
      @ConsoleParameter(name = "db2-url", description = "URL of the second database") final String iDb2URL) throws IOException {
    try {
      new ODatabaseCompare(iDb1URL, iDb2URL, this).compare();
    } catch (ODatabaseExportException e) {
      printError(e);
    }
  }
View Full Code Here

  @ConsoleCommand(description = "Compare two databases")
  public void compareDatabases(@ConsoleParameter(name = "db1-url", description = "URL of the first database") final String iDb1URL,
      @ConsoleParameter(name = "db2-url", description = "URL of the second database") final String iDb2URL) throws IOException {
    try {
      new ODatabaseCompare(iDb1URL, iDb2URL, this).compare();
    } catch (ODatabaseExportException e) {
      printError(e);
    }
  }
View Full Code Here

  @ConsoleCommand(description = "Compare two databases")
  public void compareDatabases(@ConsoleParameter(name = "db1-url", description = "URL of the first database") final String iDb1URL,
      @ConsoleParameter(name = "db2-url", description = "URL of the second database") final String iDb2URL) throws IOException {
    try {
      new ODatabaseCompare(iDb1URL, iDb2URL, this).compare();
    } catch (ODatabaseExportException e) {
      printError(e);
    }
  }
View Full Code Here

  @ConsoleCommand(description = "Compare two databases")
  public void compareDatabases(@ConsoleParameter(name = "db1-url", description = "URL of the first database") final String iDb1URL,
      @ConsoleParameter(name = "db2-url", description = "URL of the second database") final String iDb2URL) throws IOException {
    try {
      new ODatabaseCompare(iDb1URL, iDb2URL, this).compare();
    } catch (ODatabaseExportException e) {
      printError(e);
    }
  }
View Full Code Here

    testDocumentTx = new ODatabaseDocumentTx("plocal:" + buildDir.getAbsolutePath() + "/testLocalPaginatedStorageRestoreFromTx");
    testDocumentTx.open("admin", "admin");
    testDocumentTx.close();

    ODatabaseCompare databaseCompare = new ODatabaseCompare(testDocumentTx.getURL(), baseDocumentTx.getURL(), "admin", "admin",
        new OCommandOutputListener() {
          @Override
          public void onMessage(String text) {
            System.out.println(text);
          }
        });
    databaseCompare.setCompareIndexMetadata(true);

    Assert.assertTrue(databaseCompare.compare());
  }
View Full Code Here

    testDocumentTx = new ODatabaseDocumentTx("plocal:" + buildDir.getAbsolutePath() + "/testLocalPaginatedStorageRestoreFromWAL");
    testDocumentTx.open("admin", "admin");
    testDocumentTx.close();

    ODatabaseCompare databaseCompare = new ODatabaseCompare(testDocumentTx.getURL(), baseDocumentTx.getURL(), "admin", "admin",
        new OCommandOutputListener() {
          @Override
          public void onMessage(String text) {
            System.out.println(text);
          }
        });
    databaseCompare.setCompareIndexMetadata(true);

    Assert.assertTrue(databaseCompare.compare());
  }
View Full Code Here

      @ConsoleParameter(name = "user-name", description = "User name", optional = true) final String iUserName,
      @ConsoleParameter(name = "user-password", description = "User password", optional = true) final String iUserPassword,
      @ConsoleParameter(name = "detect-mapping-data", description = "Whether RID mapping data after DB import should be tried to found on the disk.", optional = true) String autoDiscoveringMappingData)
      throws IOException {
    try {
      final ODatabaseCompare compare;
      if (iUserName == null)
        compare = new ODatabaseCompare(iDb1URL, iDb2URL, this);
      else
        compare = new ODatabaseCompare(iDb1URL, iDb2URL, iUserName, iUserPassword, this);

      compare.setAutoDetectExportImportMap(autoDiscoveringMappingData != null ? Boolean.valueOf(autoDiscoveringMappingData) : true);
      compare.setCompareIndexMetadata(true);
      compare.compare();
    } catch (ODatabaseExportException e) {
      printError(e);
    }
  }
View Full Code Here

  @Test
  public void testCompareDatabases() throws IOException {
    String urlPrefix = getStorageType() + ":";

    final ODatabaseCompare databaseCompare = new ODatabaseCompare(url, urlPrefix + testPath + "/" + DbImportExportTest.NEW_DB_URL,
        "admin", "admin", this);
    databaseCompare.setCompareEntriesForAutomaticIndexes(true);
    databaseCompare.setCompareIndexMetadata(true);
    Assert.assertTrue(databaseCompare.compare());
  }
View Full Code Here

      futures.add(executorService.submit(new DataPropagationTask(dataAddSeed)));

    for (Future<Void> future : futures)
      future.get();

    ODatabaseCompare databaseCompare = new ODatabaseCompare(testDocumentTx.getURL(), baseDocumentTx.getURL(), "admin", "admin",
        new OCommandOutputListener() {
          @Override
          public void onMessage(String text) {
            System.out.println(text);
          }
        });
    databaseCompare.setCompareIndexMetadata(true);

    Assert.assertTrue(databaseCompare.compare());
  }
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.db.tool.ODatabaseCompare

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.