You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@griffin.apache.org by GitBox <gi...@apache.org> on 2020/11/03 15:04:36 UTC

[GitHub] [griffin] chitralverma commented on a change in pull request #586: Change connectors to connector for datasource

chitralverma commented on a change in pull request #586:
URL: https://github.com/apache/griffin/pull/586#discussion_r516723532



##########
File path: service/src/main/java/org/apache/griffin/core/util/MeasureUtil.java
##########
@@ -90,8 +88,7 @@ private static void validateExternalMeasure(ExternalMeasure measure) {
         Set<String> sets = new HashSet<>();
         List<DataSource> sources = measure.getDataSources();
         for (DataSource source : sources) {
-            source.getConnectors().stream().filter(dc -> dc.getName() != null)
-                .forEach(dc -> sets.add(dc.getName()));
+            sets.add(source.getConnector().getName());

Review comment:
       Has this null check been handled else where?

##########
File path: ui/angular/src/app/job/create-job/streaming/streaming.component.ts
##########
@@ -234,23 +234,21 @@ export class StreamingComponent implements OnInit {
       if (measure == map.name) {
         var source = map["data.sources"];
         for (let i = 0; i < source.length; i++) {
-          var details = source[i].connectors;
-          for (let j = 0; j < details.length; j++) {
-            if (details[j]["data.unit"] != undefined) {
-              var table =
-                details[j].config.database +
-                "." +
-                details[j].config["table.name"];
-              var size = details[j]["data.unit"];
-              var connectorname = details[j]["name"];
-              var detail = {
-                id: i + 1,
-                name: table,
-                size: size,
-                connectorname: connectorname
-              };
-              this.dropdownList.push(detail);
-            }
+          var connector = source[i].connector;
+          if (connector["data.unit"] != undefined) {
+            var table =
+              connector.config.database +
+              "." +
+              connector.config["table.name"];
+            var size = connector["data.unit"];
+            var connectorname = connector["name"];
+            var detail = {
+              id: i + 1,
+              name: table,
+              size: size,
+              connectorname: connectorname

Review comment:
       Not sure about this part




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org