ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: # IGNITE-32 WIP: GUI: added sort for schemas and tables.
Date Tue, 13 Jan 2015 04:27:31 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-32 81d251141 -> 2a89ce079


# IGNITE-32 WIP: GUI: added sort for schemas and tables.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/2a89ce07
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/2a89ce07
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/2a89ce07

Branch: refs/heads/ignite-32
Commit: 2a89ce07916886d464ab65aa4197a84b3adecb65
Parents: 81d2511
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Tue Jan 13 11:27:55 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Tue Jan 13 11:27:55 2015 +0700

----------------------------------------------------------------------
 .../org/apache/ignite/schema/db/DbMetadataParser.java |  6 +++---
 .../org/apache/ignite/schema/ui/SchemaLoadApp.java    | 14 +++++++-------
 2 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2a89ce07/modules/schema-load/src/main/java/org/apache/ignite/schema/db/DbMetadataParser.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/db/DbMetadataParser.java
b/modules/schema-load/src/main/java/org/apache/ignite/schema/db/DbMetadataParser.java
index e43394f..ecc7ef2 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/db/DbMetadataParser.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/db/DbMetadataParser.java
@@ -184,11 +184,11 @@ public class DbMetadataParser {
      * @return Map with schemes and tables metadata.
      * @throws SQLException If parsing failed.
      */
-    public static LinkedHashMap<String, LinkedHashMap<String, GridCacheQueryTypeMetadata>>
parse(Connection conn)
+    public static Map<String, Map<String, GridCacheQueryTypeMetadata>> parse(Connection
conn)
         throws SQLException {
         DatabaseMetaData meta = conn.getMetaData();
 
-        LinkedHashMap<String, LinkedHashMap<String, GridCacheQueryTypeMetadata>>
res = new LinkedHashMap<>();
+        Map<String, Map<String, GridCacheQueryTypeMetadata>> res = new HashMap<>();
 
         try (ResultSet schemas = meta.getSchemas()) {
             while (schemas.next()) {
@@ -200,7 +200,7 @@ public class DbMetadataParser {
 
                 String catalog = schemas.getString(2);
 
-                LinkedHashMap<String, GridCacheQueryTypeMetadata> items = new LinkedHashMap<>();
+                Map<String, GridCacheQueryTypeMetadata> items = new HashMap<>();
 
                 try (ResultSet tbls = meta.getTables(catalog, schema, "%", null)) {
                     while (tbls.next()) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2a89ce07/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/SchemaLoadApp.java
----------------------------------------------------------------------
diff --git a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/SchemaLoadApp.java
b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/SchemaLoadApp.java
index 92fa7ea..6a57d8d 100644
--- a/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/SchemaLoadApp.java
+++ b/modules/schema-load/src/main/java/org/apache/ignite/schema/ui/SchemaLoadApp.java
@@ -129,7 +129,7 @@ public class SchemaLoadApp extends Application {
     private String replace;
 
     /** Map with types metadata. */
-    private LinkedHashMap<String, LinkedHashMap<String, GridCacheQueryTypeMetadata>>
metas;
+    private Map<String, Map<String, GridCacheQueryTypeMetadata>> metas;
 
     /** Map with fields descriptors. */
     private Map<String, Map<String, ObservableList<Field>>> fields = Collections.emptyMap();
@@ -213,16 +213,16 @@ public class SchemaLoadApp extends Application {
                     metas = DbMetadataParser.parse(conn);
                 }
 
-                fields = U.newHashMap(metas.size());
-                fieldsPrev = U.newHashMap(metas.size());
+                fields = new TreeMap<>();
+                fieldsPrev = new TreeMap<>();
 
-                for (Map.Entry<String, LinkedHashMap<String, GridCacheQueryTypeMetadata>>
meta : metas.entrySet()) {
+                for (Map.Entry<String, Map<String, GridCacheQueryTypeMetadata>>
meta : metas.entrySet()) {
                     String schema = meta.getKey();
 
-                    LinkedHashMap<String, GridCacheQueryTypeMetadata> tbls = meta.getValue();
+                    Map<String, GridCacheQueryTypeMetadata> tbls = meta.getValue();
 
-                    Map<String, ObservableList<Field>> tblsFields = U.newHashMap(tbls.size());
-                    Map<String, ObservableList<Field>> tblsFieldsPrev = U.newHashMap(tbls.size());
+                    Map<String, ObservableList<Field>> tblsFields = new TreeMap<>();
+                    Map<String, ObservableList<Field>> tblsFieldsPrev = new TreeMap<>();
 
                     fields.put(schema, tblsFields);
                     fieldsPrev.put(schema, tblsFieldsPrev);


Mime
View raw message