Change Password

Please enter the password.
Please enter the password. Between 8-64 characters. Not identical to your email address. Contain at least 3 of: uppercase, lowercase, numbers, and special characters.
Please enter the password.
Submit

Change Nickname

Current Nickname:
Submit

Apply New License

License Detail

Please complete this required field.

  • Ultipa Graph V4

Standalone

Please complete this required field.

Please complete this required field.

The MAC address of the server you want to deploy.

Please complete this required field.

Please complete this required field.

Cancel
Apply
ID
Product
Status
Cores
Applied Validity Period(days)
Effective Date
Excpired Date
Mac Address
Apply Comment
Review Comment
Close
Profile
  • Full Name:
  • Phone:
  • Company:
  • Company Email:
  • Country:
  • Language:
Change Password
Apply

You have no license application record.

Apply
Certificate Issued at Valid until Serial No. File
Serial No. Valid until File

Not having one? Apply now! >>>

Product Created On ID Amount (USD) Invoice
Product Created On ID Amount (USD) Invoice

No Invoice

v4.5
Search
    Français
    v4.5

      Téléchargements et Exportations

      Cette section présente des méthodes sur un objet Connection pour télécharger les fichiers de résultat d'un algorithme et exporter des nodes et edges d'un graphset.

      Chaque exemple se concentre uniquement sur l'utilisation de la méthode. Pour un exemple de code complet, veuillez vous référer à l'exemple complet.

      downloadAlgoResultFile()

      Télécharge un fichier de résultat d'une tâche d'algorithme dans le graph actuel.

      Paramètres :

      • String : Nom du fichier.
      • String: ID de la tâche d'algorithme qui a généré le fichier.
      • DownloadFileResultListener : Écouteur pour le processus de téléchargement.
      • RequestConfig (Optionnel) : Paramètres de configuration pour la requête.

      Retourne :

      • Response : Résultat de la requête.

      RequestConfig requestConfig = new RequestConfig();
      requestConfig.setGraphName("miniCircle");
      
      // Exécute l'algorithme Louvain dans le graphset 'miniCircle' et imprime l'ID de la tâche
      
      Response response = client.uql("algo(louvain).params({phase1_loop_num: 20, min_modularity_increase: 0.001}).write({file:{filename_community_id: 'communityID', filename_ids: 'ids', filename_num: 'num'}})", requestConfig);
      Table table = response.alias("_task").asTable();
      String taskId = (String) table.getRows().get(0).get(0);
      System.out.println("taskId = " + taskId);
      
      Thread.sleep(2000);
      
      // Télécharge un fichier généré par la tâche d'algorithme ci-dessus, imprime le contenu dans le fichier et imprime les informations de la réponse de téléchargement
      
      Response resDownLoad = client.downloadAlgoResultFile("communityID", taskId, new DownloadFileResultListener() {
          public void onReady(String s) {
              System.out.println("Start downloading");
          }
          public void next(String filename, DownloadFileResult result) {
              System.out.println("Content of the file '" + filename + "':");
              System.out.println("-----------------------");
              System.out.println(new String(result.getBytes(), StandardCharsets.UTF_8));
              System.out.println("-----------------------");
          }
          public void onComplete(String s) {
              System.out.println("Download complete");
          }
          public void onError(String s, Throwable throwable) {
              System.out.println("Error occurred while downloading");
          }
      }, requestConfig);
      
      System.out.println("resDownLoad = " + new Gson().toJson(resDownLoad));
      

      taskId = 54228
      Content of the file 'communityID':
      -----------------------
      ULTIPA8000000000000001,94
      ...
      ULTIPA8000000000004E6E,154
      
      -----------------------
      Download complete
      resDownLoad = {"host":"192.168.1.88:60611","status":{"errorCode":"SUCCESS","msg":"","clusterInfo":{"redirect":"","leaderAddress":"","followers":[]}},"aliases":[],"items":{}}
      

      downloadAllAlgoResultFile()

      Télécharge tous les fichiers de résultat d'une tâche d'algorithme dans le graph actuel.

      Paramètres :

      • String: ID de la tâche d'algorithme qui a généré le(s) fichier(s).
      • DownloadFileResultListener : Écouteur pour le processus de téléchargement.
      • RequestConfig (Optionnel) : Paramètres de configuration pour la requête.

      Retourne :

      • Response : Résultat de la requête.

      RequestConfig requestConfig = new RequestConfig();
      requestConfig.setGraphName("miniCircle");
      
      // Exécute l'algorithme Louvain dans le graphset 'miniCircle' et imprime l'ID de la tâche
      
      Response response = client.uql("algo(louvain).params({phase1_loop_num: 20, min_modularity_increase: 0.001}).write({file:{filename_community_id: 'communityID', filename_ids: 'ids', filename_num: 'num'}})", requestConfig);
      Table table = response.alias("_task").asTable();
      String taskId = (String) table.getRows().get(0).get(0);
      System.out.println("taskId = " + taskId);
      
      Thread.sleep(2000);
      
      // Télécharge tous les fichiers générés par la tâche d'algorithme ci-dessus, imprime le contenu dans chaque fichier et imprime les informations de la réponse de téléchargement 
      
      Response resDownLoad = client.downloadAllAlgoResultFile(taskId, new DownloadFileResultListener() {
          public void onReady(String s) {
              System.out.println("Start downloading");
          }
          public void next(String filename, DownloadFileResult result) {
              System.out.println("Content of the file '" + filename + "':");
              System.out.println("-----------------------");
              System.out.println(new String(result.getBytes(), StandardCharsets.UTF_8));
              System.out.println("-----------------------");
          }
          public void onComplete(String s) {
              System.out.println("Download complete");
          }
          public void onError(String s, Throwable throwable) {
              System.out.println("Error occurred while downloading");
          }
      }, requestConfig);
      
      System.out.println("resDownLoad = " + new Gson().toJson(resDownLoad));
      

      taskId = 54229
      Content of the file 'communityID':
      -----------------------
      ULTIPA8000000000000001,137
      ...
      ULTIPA8000000000004E6E,284
      
      -----------------------
      Download complete
      Content of the file 'ids':
      -----------------------
      284,ULTIPA800000000000001A,ULTIPA8000000000000412,...
      ...
      179,ULTIPA800000000000001E,ULTIPA800000000000002B,...
      -----------------------
      Download complete
      Content of the file 'num':
      -----------------------
      284,89
      ...
      179,23
      
      -----------------------
      Download complete
      resDownLoad = {"status":{"errorCode":"SUCCESS","msg":"success"},"aliases":[],"items":{}}
      

      export()

      Exporte des nodes et edges du graph actuel.

      Paramètres :

      • ExportRequest : Configurations pour la requête d'export, incluant dbType:Ultipa.DBType, schema:String, limit:Integer et selectPropertiesName:List<String>.
      • ExportListener : Écouteur pour le processus d'exportation.
      • RequestConfig (Optionnel) : Paramètres de configuration pour la requête.

      Retourne :

      • Response : Résultat de la requête.

      // Exporte 10 **nodes** de schema 'account' avec des propriétés sélectionnées dans le graphset 'miniCircle' et imprime leurs informations
      
      RequestConfig requestConfig = new RequestConfig();
      requestConfig.setGraphName("miniCircle");
      
      ExportRequest exportRequest = new ExportRequest();
      exportRequest.setDbType(Ultipa.DBType.DBNODE);
      exportRequest.setLimit(10);
      exportRequest.setSchema("account");
      exportRequest.setSelectPropertiesName(Arrays.asList("_id", "_uuid", "name", "year"));
      
      Response response = client.export(exportRequest, new ExportListener() {
          public void onReady() {
              System.out.println("Start downloading");
          }
          public void onError(Throwable t) {
              System.out.println("Error occurred while downloading");
          }
          public void onComplete() {
              System.out.println("Download complete");
          }
      
          public void next(ExportData result) {
              List<Node> nodes = result.getNodes();
              for (Node node : nodes) {
                  System.out.println(node.toString());
              }
          }
      }, requestConfig);
      

      Node(uuid=1, id=ULTIPA8000000000000001, schema=account, values={_id=ULTIPA8000000000000001, name=Yu78, year=1978})
      Node(uuid=2, id=ULTIPA8000000000000002, schema=account, values={_id=ULTIPA8000000000000002, name=jibber-jabber, year=1989})
      Node(uuid=3, id=ULTIPA8000000000000003, schema=account, values={_id=ULTIPA8000000000000003, name=mochaeach, year=1982})
      Node(uuid=4, id=ULTIPA8000000000000004, schema=account, values={_id=ULTIPA8000000000000004, name=Win-win0, year=2007})
      Node(uuid=5, id=ULTIPA8000000000000005, schema=account, values={_id=ULTIPA8000000000000005, name=kevinh, year=1973})
      Node(uuid=6, id=ULTIPA8000000000000006, schema=account, values={_id=ULTIPA8000000000000006, name=alexyhel, year=1974})
      Node(uuid=7, id=ULTIPA8000000000000007, schema=account, values={_id=ULTIPA8000000000000007, name=hooj, year=1986})
      Node(uuid=8, id=ULTIPA8000000000000008, schema=account, values={_id=ULTIPA8000000000000008, name=vv67, year=1990})
      Node(uuid=9, id=ULTIPA8000000000000009, schema=account, values={_id=ULTIPA8000000000000009, name=95smith, year=1988})
      Node(uuid=10, id=ULTIPA800000000000000A, schema=account, values={_id=ULTIPA800000000000000A, name=jo, year=1992})
      Download complete
      

      Exemple Complet

      package com.ultipa.www.sdk.api;
      
      import com.google.gson.Gson;
      import com.ultipa.sdk.connect.Connection;
      import com.ultipa.sdk.connect.conf.RequestConfig;
      import com.ultipa.sdk.connect.conf.UltipaConfiguration;
      import com.ultipa.sdk.connect.driver.UltipaClientDriver;
      import com.ultipa.sdk.operate.command.listener.DownloadFileResultListener;
      import com.ultipa.sdk.operate.entity.*;
      import com.ultipa.sdk.operate.response.DownloadFileResult;
      import com.ultipa.sdk.operate.response.Response;
      import java.nio.charset.StandardCharsets;
      
      public class Main {
          public static void main(String[] args) {
              // Configurations de connexion
              UltipaConfiguration myConfig = UltipaConfiguration.config()
                  // Exemple de URI: .hosts("mqj4zouys.us-east-1.cloud.ultipa.com:60010")
                  .hosts("192.168.1.85:60611,192.168.1.87:60611,192.168.1.88:60611")
                  .username("<username>")
                  .password("<password>");
      
              UltipaClientDriver driver = null;
              try {
                  // Établit la connexion à la base de données
                  driver = new UltipaClientDriver(myConfig);
                  Connection client = driver.getConnection();
      
                  Thread.sleep(3000);
                
                  RequestConfig requestConfig = new RequestConfig();
                  requestConfig.setGraphName("miniCircle");
      
                  // Exécute l'algorithme Louvain et imprime l'ID de la tâche
      
                  Response response = client.uql("algo(louvain).params({phase1_loop_num: 20, min_modularity_increase: 0.001}).write({file:{filename_community_id: 'communityID', filename_ids: 'ids', filename_num: 'num'}})", requestConfig);
                  Table table = response.alias("_task").asTable();
                  String taskId = (String) table.getRows().get(0).get(0);
                  System.out.println("taskId = " + taskId);
      
                  Thread.sleep(2000);
      
                  // Télécharge tous les fichiers générés par la tâche d'algorithme ci-dessus, imprime le contenu dans chaque fichier et imprime les informations de la réponse de téléchargement 
      
                  Response resDownLoad = client.downloadAllAlgoResultFile(taskId, new DownloadFileResultListener() {
                      public void onReady(String s) {
                          System.out.println("Start downloading");
                      }
                      public void next(String filename, DownloadFileResult result) {
                          System.out.println("Content of the file '" + filename + "':");
                          System.out.println("-----------------------");
                          System.out.println(new String(result.getBytes(), StandardCharsets.UTF_8));
                          System.out.println("-----------------------");
                      }
                      public void onComplete(String s) {
                          System.out.println("Download complete");
                      }
                      public void onError(String s, Throwable throwable) {
                          System.out.println("Error occurred while downloading");
                      }
                  }, requestConfig);
      
                  System.out.println("resDownLoad = " + new Gson().toJson(resDownLoad));
              } catch (InterruptedException e) {
                  throw new RuntimeException(e);
              } finally {
                  if (driver != null) {
                      driver.close();
                  }
              }
          }
      }
      
      Please complete the following information to download this book
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写