Shirly Radco has uploaded a new change for review. Change subject: history: change disks usage aggregation ......................................................................
history: change disks usage aggregation Made change in the disks usage aggregation process to make it more efficient. Change-Id: Iacff81b722d27d19f6ff304756255c5435045fe6 Bug-Url:https://bugzilla.redhat.com/1202661 Signed-off-by: Shirly Radco <[email protected]> --- M etl_export/src/ovirt_engine_dwh/aggregationtodaily_3_5/AggregationToDaily.java M etl_export/src/ovirt_engine_dwh/aggregationtohourly_3_5/AggregationToHourly.java M tos_project/process/AggregationToDaily_3.5.item M tos_project/process/AggregationToDaily_3.5.properties M tos_project/process/AggregationToHourly_3.5.item M tos_project/process/AggregationToHourly_3.5.properties 6 files changed, 1,984 insertions(+), 205 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-dwh refs/changes/12/38812/1 diff --git a/etl_export/src/ovirt_engine_dwh/aggregationtodaily_3_5/AggregationToDaily.java b/etl_export/src/ovirt_engine_dwh/aggregationtodaily_3_5/AggregationToDaily.java index ef2d106..e6a94e3 100644 --- a/etl_export/src/ovirt_engine_dwh/aggregationtodaily_3_5/AggregationToDaily.java +++ b/etl_export/src/ovirt_engine_dwh/aggregationtodaily_3_5/AggregationToDaily.java @@ -832,6 +832,26 @@ tJDBCInput_13_onSubJobError(exception, errorComponent, globalMap); } + public void tAggregateRow_9_AGGOUT_error(java.lang.Exception exception, + String errorComponent, final java.util.Map<String, Object> globalMap) + throws TalendException { + end_Hash.put("tAggregateRow_9_AGGOUT", System.currentTimeMillis()); + + ((java.util.Map) threadLocal.get()).put("status", "failure"); + + tJDBCInput_9_onSubJobError(exception, errorComponent, globalMap); + } + + public void tAggregateRow_9_AGGIN_error(java.lang.Exception exception, + String errorComponent, final java.util.Map<String, Object> globalMap) + throws TalendException { + end_Hash.put("tAggregateRow_9_AGGIN", System.currentTimeMillis()); + + ((java.util.Map) threadLocal.get()).put("status", "failure"); + + tJDBCInput_9_onSubJobError(exception, errorComponent, globalMap); + } + public void tAggregateRow_8_AGGOUT_error(java.lang.Exception exception, String errorComponent, final java.util.Map<String, Object> globalMap) throws TalendException { @@ -19433,8 +19453,8 @@ globalMap.put("tRowGenerator_1_SUBPROCESS_STATE", 1); } - public static class disks_usage_dailyStruct implements - routines.system.IPersistableRow<disks_usage_dailyStruct> { + public static class row15Struct implements + routines.system.IPersistableRow<row15Struct> { final static byte[] commonByteArrayLock_OVIRT_ENGINE_DWH_AggregationToDaily = new byte[0]; static byte[] commonByteArray_OVIRT_ENGINE_DWH_AggregationToDaily = new byte[0]; @@ -19578,7 +19598,359 @@ /** * Compare keys */ - public int compareTo(disks_usage_dailyStruct other) { + public int compareTo(row15Struct other) { + + int returnValue = -1; + + return returnValue; + } + + private int checkNullsAndCompare(Object object1, Object object2) { + int returnValue = 0; + if (object1 instanceof Comparable && object2 instanceof Comparable) { + returnValue = ((Comparable) object1).compareTo(object2); + } else if (object1 != null && object2 != null) { + returnValue = compareStrings(object1.toString(), + object2.toString()); + } else if (object1 == null && object2 != null) { + returnValue = 1; + } else if (object1 != null && object2 == null) { + returnValue = -1; + } else { + returnValue = 0; + } + + return returnValue; + } + + private int compareStrings(String string1, String string2) { + return string1.compareTo(string2); + } + + } + + public static class OnRowsEndStructtAggregateRow_9 implements + routines.system.IPersistableRow<OnRowsEndStructtAggregateRow_9> { + final static byte[] commonByteArrayLock_OVIRT_ENGINE_DWH_AggregationToDaily = new byte[0]; + static byte[] commonByteArray_OVIRT_ENGINE_DWH_AggregationToDaily = new byte[0]; + + public java.util.Date history_datetime; + + public java.util.Date getHistory_datetime() { + return this.history_datetime; + } + + public Object vm_id; + + public Object getVm_id() { + return this.vm_id; + } + + public String disks_usage; + + public String getDisks_usage() { + return this.disks_usage; + } + + private java.util.Date readDate(ObjectInputStream dis) + throws IOException { + java.util.Date dateReturn = null; + int length = 0; + length = dis.readByte(); + if (length == -1) { + dateReturn = null; + } else { + dateReturn = new Date(dis.readLong()); + } + return dateReturn; + } + + private void writeDate(java.util.Date date1, ObjectOutputStream dos) + throws IOException { + if (date1 == null) { + dos.writeByte(-1); + } else { + dos.writeByte(0); + dos.writeLong(date1.getTime()); + } + } + + private String readString(ObjectInputStream dis) throws IOException { + String strReturn = null; + int length = 0; + length = dis.readInt(); + if (length == -1) { + strReturn = null; + } else { + if (length > commonByteArray_OVIRT_ENGINE_DWH_AggregationToDaily.length) { + if (length < 1024 + && commonByteArray_OVIRT_ENGINE_DWH_AggregationToDaily.length == 0) { + commonByteArray_OVIRT_ENGINE_DWH_AggregationToDaily = new byte[1024]; + } else { + commonByteArray_OVIRT_ENGINE_DWH_AggregationToDaily = new byte[2 * length]; + } + } + dis.readFully( + commonByteArray_OVIRT_ENGINE_DWH_AggregationToDaily, 0, + length); + strReturn = new String( + commonByteArray_OVIRT_ENGINE_DWH_AggregationToDaily, 0, + length, utf8Charset); + } + return strReturn; + } + + private void writeString(String str, ObjectOutputStream dos) + throws IOException { + if (str == null) { + dos.writeInt(-1); + } else { + byte[] byteArray = str.getBytes(utf8Charset); + dos.writeInt(byteArray.length); + dos.write(byteArray); + } + } + + public void readData(ObjectInputStream dis) { + + synchronized (commonByteArrayLock_OVIRT_ENGINE_DWH_AggregationToDaily) { + + try { + + int length = 0; + + this.history_datetime = readDate(dis); + + this.vm_id = (Object) dis.readObject(); + + this.disks_usage = readString(dis); + + } catch (IOException e) { + throw new RuntimeException(e); + + } catch (ClassNotFoundException eCNFE) { + throw new RuntimeException(eCNFE); + + } + + } + + } + + public void writeData(ObjectOutputStream dos) { + try { + + // java.util.Date + + writeDate(this.history_datetime, dos); + + // Object + + dos.writeObject(this.vm_id); + + // String + + writeString(this.disks_usage, dos); + + } catch (IOException e) { + throw new RuntimeException(e); + } + + } + + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append(super.toString()); + sb.append("["); + sb.append("history_datetime=" + String.valueOf(history_datetime)); + sb.append(",vm_id=" + String.valueOf(vm_id)); + sb.append(",disks_usage=" + disks_usage); + sb.append("]"); + + return sb.toString(); + } + + /** + * Compare keys + */ + public int compareTo(OnRowsEndStructtAggregateRow_9 other) { + + int returnValue = -1; + + return returnValue; + } + + private int checkNullsAndCompare(Object object1, Object object2) { + int returnValue = 0; + if (object1 instanceof Comparable && object2 instanceof Comparable) { + returnValue = ((Comparable) object1).compareTo(object2); + } else if (object1 != null && object2 != null) { + returnValue = compareStrings(object1.toString(), + object2.toString()); + } else if (object1 == null && object2 != null) { + returnValue = 1; + } else if (object1 != null && object2 == null) { + returnValue = -1; + } else { + returnValue = 0; + } + + return returnValue; + } + + private int compareStrings(String string1, String string2) { + return string1.compareTo(string2); + } + + } + + public static class disks_usage_aggregateStruct implements + routines.system.IPersistableRow<disks_usage_aggregateStruct> { + final static byte[] commonByteArrayLock_OVIRT_ENGINE_DWH_AggregationToDaily = new byte[0]; + static byte[] commonByteArray_OVIRT_ENGINE_DWH_AggregationToDaily = new byte[0]; + + public java.util.Date history_datetime; + + public java.util.Date getHistory_datetime() { + return this.history_datetime; + } + + public Object vm_id; + + public Object getVm_id() { + return this.vm_id; + } + + public String disks_usage; + + public String getDisks_usage() { + return this.disks_usage; + } + + private java.util.Date readDate(ObjectInputStream dis) + throws IOException { + java.util.Date dateReturn = null; + int length = 0; + length = dis.readByte(); + if (length == -1) { + dateReturn = null; + } else { + dateReturn = new Date(dis.readLong()); + } + return dateReturn; + } + + private void writeDate(java.util.Date date1, ObjectOutputStream dos) + throws IOException { + if (date1 == null) { + dos.writeByte(-1); + } else { + dos.writeByte(0); + dos.writeLong(date1.getTime()); + } + } + + private String readString(ObjectInputStream dis) throws IOException { + String strReturn = null; + int length = 0; + length = dis.readInt(); + if (length == -1) { + strReturn = null; + } else { + if (length > commonByteArray_OVIRT_ENGINE_DWH_AggregationToDaily.length) { + if (length < 1024 + && commonByteArray_OVIRT_ENGINE_DWH_AggregationToDaily.length == 0) { + commonByteArray_OVIRT_ENGINE_DWH_AggregationToDaily = new byte[1024]; + } else { + commonByteArray_OVIRT_ENGINE_DWH_AggregationToDaily = new byte[2 * length]; + } + } + dis.readFully( + commonByteArray_OVIRT_ENGINE_DWH_AggregationToDaily, 0, + length); + strReturn = new String( + commonByteArray_OVIRT_ENGINE_DWH_AggregationToDaily, 0, + length, utf8Charset); + } + return strReturn; + } + + private void writeString(String str, ObjectOutputStream dos) + throws IOException { + if (str == null) { + dos.writeInt(-1); + } else { + byte[] byteArray = str.getBytes(utf8Charset); + dos.writeInt(byteArray.length); + dos.write(byteArray); + } + } + + public void readData(ObjectInputStream dis) { + + synchronized (commonByteArrayLock_OVIRT_ENGINE_DWH_AggregationToDaily) { + + try { + + int length = 0; + + this.history_datetime = readDate(dis); + + this.vm_id = (Object) dis.readObject(); + + this.disks_usage = readString(dis); + + } catch (IOException e) { + throw new RuntimeException(e); + + } catch (ClassNotFoundException eCNFE) { + throw new RuntimeException(eCNFE); + + } + + } + + } + + public void writeData(ObjectOutputStream dos) { + try { + + // java.util.Date + + writeDate(this.history_datetime, dos); + + // Object + + dos.writeObject(this.vm_id); + + // String + + writeString(this.disks_usage, dos); + + } catch (IOException e) { + throw new RuntimeException(e); + } + + } + + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append(super.toString()); + sb.append("["); + sb.append("history_datetime=" + String.valueOf(history_datetime)); + sb.append(",vm_id=" + String.valueOf(vm_id)); + sb.append(",disks_usage=" + disks_usage); + sb.append("]"); + + return sb.toString(); + } + + /** + * Compare keys + */ + public int compareTo(disks_usage_aggregateStruct other) { int returnValue = -1; @@ -19791,6 +20163,7 @@ globalMap.put("tJDBCInput_9_SUBPROCESS_STATE", 0); final boolean execStat = this.execStat; + String currentVirtualComponent = null; String iterateId = ""; int iterateLoop = 0; @@ -19808,47 +20181,303 @@ globalResumeTicket = true; row12Struct row12 = new row12Struct(); - disks_usage_dailyStruct disks_usage_daily = new disks_usage_dailyStruct(); + disks_usage_aggregateStruct disks_usage_aggregate = new disks_usage_aggregateStruct(); + row15Struct row15 = new row15Struct(); /** - * [tJDBCOutput_9 begin ] start + * [tAggregateRow_9_AGGOUT begin ] start */ - ok_Hash.put("tJDBCOutput_9", false); - start_Hash.put("tJDBCOutput_9", System.currentTimeMillis()); + ok_Hash.put("tAggregateRow_9_AGGOUT", false); + start_Hash.put("tAggregateRow_9_AGGOUT", + System.currentTimeMillis()); - currentComponent = "tJDBCOutput_9"; + currentVirtualComponent = "tAggregateRow_9"; - int tos_count_tJDBCOutput_9 = 0; + currentComponent = "tAggregateRow_9_AGGOUT"; - int nb_line_tJDBCOutput_9 = 0; - int nb_line_update_tJDBCOutput_9 = 0; - int nb_line_inserted_tJDBCOutput_9 = 0; - int nb_line_deleted_tJDBCOutput_9 = 0; - int nb_line_rejected_tJDBCOutput_9 = 0; + int tos_count_tAggregateRow_9_AGGOUT = 0; - int tmp_batchUpdateCount_tJDBCOutput_9 = 0; + // ------------ - int deletedCount_tJDBCOutput_9 = 0; - int updatedCount_tJDBCOutput_9 = 0; - int insertedCount_tJDBCOutput_9 = 0; - int rejectedCount_tJDBCOutput_9 = 0; + java.util.Map hashAggreg_tAggregateRow_9 = new java.util.HashMap(); - boolean whetherReject_tJDBCOutput_9 = false; + // ------------ - java.sql.Connection connection_tJDBCOutput_9 = (java.sql.Connection) globalMap - .get("conn_tJDBCConnection_1"); - int batchSize_tJDBCOutput_9 = 10000; - int batchSizeCounter_tJDBCOutput_9 = 0; + class UtilClass_tAggregateRow_9 { // G_OutBegin_AggR_144 - String insert_tJDBCOutput_9 = "INSERT INTO " - + "vm_disks_usage_daily_history" - + " (history_datetime,vm_id,disks_usage) VALUES (?,?,?)"; - java.sql.PreparedStatement pstmt_tJDBCOutput_9 = connection_tJDBCOutput_9 - .prepareStatement(insert_tJDBCOutput_9); + public double sd(Double[] data) { + final int n = data.length; + if (n < 2) { + return Double.NaN; + } + double d1 = 0d; + double d2 = 0d; + + for (int i = 0; i < data.length; i++) { + d1 += (data[i] * data[i]); + d2 += data[i]; + } + + return Math.sqrt((n * d1 - d2 * d2) / n / (n - 1)); + } + + public void checkedIADD(byte a, byte b, + boolean checkTypeOverFlow, boolean checkUlp) { + byte r = (byte) (a + b); + if (checkTypeOverFlow && ((a ^ r) & (b ^ r)) < 0) { + + throw new RuntimeException(buildOverflowMessage( + String.valueOf(a), String.valueOf(b), + "'short/Short'", "'int/Integer'")); + } + } + + public void checkedIADD(short a, short b, + boolean checkTypeOverFlow, boolean checkUlp) { + short r = (short) (a + b); + if (checkTypeOverFlow && ((a ^ r) & (b ^ r)) < 0) { + + throw new RuntimeException(buildOverflowMessage( + String.valueOf(a), String.valueOf(b), + "'int/Integer'", "'short/Short'")); + } + } + + public void checkedIADD(int a, int b, + boolean checkTypeOverFlow, boolean checkUlp) { + int r = a + b; + if (checkTypeOverFlow && ((a ^ r) & (b ^ r)) < 0) { + + throw new RuntimeException(buildOverflowMessage( + String.valueOf(a), String.valueOf(b), + "'long/Long'", "'int/Integer'")); + } + } + + public void checkedIADD(long a, long b, + boolean checkTypeOverFlow, boolean checkUlp) { + long r = a + b; + if (checkTypeOverFlow && ((a ^ r) & (b ^ r)) < 0) { + throw new RuntimeException(buildOverflowMessage( + String.valueOf(a), String.valueOf(b), + "'BigDecimal'", "'long/Long'")); + } + } + + public void checkedIADD(float a, float b, + boolean checkTypeOverFlow, boolean checkUlp) { + + if (checkUlp) { + float minAddedValue = Math.ulp(a); + if (minAddedValue > Math.abs(b)) { + + throw new RuntimeException( + buildPrecisionMessage( + String.valueOf(a), + String.valueOf(b), + "'double' or 'BigDecimal'", + "'float/Float'")); + } + } + + if (checkTypeOverFlow + && ((double) a + (double) b > (double) Float.MAX_VALUE) + || ((double) a + (double) b < (double) -Float.MAX_VALUE)) { + + throw new RuntimeException( + buildOverflowMessage(String.valueOf(a), + String.valueOf(b), + "'double' or 'BigDecimal'", + "'float/Float'")); + } + } + + public void checkedIADD(double a, double b, + boolean checkTypeOverFlow, boolean checkUlp) { + + if (checkUlp) { + double minAddedValue = Math.ulp(a); + if (minAddedValue > Math.abs(b)) { + + throw new RuntimeException( + buildPrecisionMessage( + String.valueOf(a), + String.valueOf(a), + "'BigDecimal'", + "'double/Double'")); + } + } + + if (checkTypeOverFlow + && (a + b > (double) Double.MAX_VALUE) + || (a + b < -Double.MAX_VALUE)) { + + throw new RuntimeException(buildOverflowMessage( + String.valueOf(a), String.valueOf(b), + "'BigDecimal'", "'double/Double'")); + } + } + + public void checkedIADD(double a, byte b, + boolean checkTypeOverFlow, boolean checkUlp) { + + if (checkTypeOverFlow + && (a + b > (double) Double.MAX_VALUE) + || (a + b < -Double.MAX_VALUE)) { + + throw new RuntimeException(buildOverflowMessage( + String.valueOf(a), String.valueOf(b), + "'BigDecimal'", "'double/Double'")); + } + } + + public void checkedIADD(double a, short b, + boolean checkTypeOverFlow, boolean checkUlp) { + + if (checkTypeOverFlow + && (a + b > (double) Double.MAX_VALUE) + || (a + b < -Double.MAX_VALUE)) { + + throw new RuntimeException(buildOverflowMessage( + String.valueOf(a), String.valueOf(b), + "'BigDecimal'", "'double/Double'")); + } + } + + public void checkedIADD(double a, int b, + boolean checkTypeOverFlow, boolean checkUlp) { + + if (checkTypeOverFlow + && (a + b > (double) Double.MAX_VALUE) + || (a + b < -Double.MAX_VALUE)) { + + throw new RuntimeException(buildOverflowMessage( + String.valueOf(a), String.valueOf(b), + "'BigDecimal'", "'double/Double'")); + } + } + + public void checkedIADD(double a, float b, + boolean checkTypeOverFlow, boolean checkUlp) { + + if (checkUlp) { + double minAddedValue = Math.ulp(a); + if (minAddedValue > Math.abs(b)) { + + throw new RuntimeException( + buildPrecisionMessage( + String.valueOf(a), + String.valueOf(a), + "'BigDecimal'", + "'double/Double'")); + } + } + + if (checkTypeOverFlow + && (a + b > (double) Double.MAX_VALUE) + || (a + b < -Double.MAX_VALUE)) { + + throw new RuntimeException(buildOverflowMessage( + String.valueOf(a), String.valueOf(b), + "'BigDecimal'", "'double/Double'")); + } + } + + private String buildOverflowMessage(String a, String b, + String advicedTypes, String originalType) { + return "Type overflow when adding " + + b + + " to " + + a + + ", to resolve this problem, increase the precision by using " + + advicedTypes + " type in place of " + + originalType + "."; + } + + private String buildPrecisionMessage(String a, String b, + String advicedTypes, String originalType) { + return "The double precision is unsufficient to add the value " + + b + + " to " + + a + + ", to resolve this problem, increase the precision by using " + + advicedTypes + + " type in place of " + + originalType + "."; + } + + } // G_OutBegin_AggR_144 + + UtilClass_tAggregateRow_9 utilClass_tAggregateRow_9 = new UtilClass_tAggregateRow_9(); + + class AggOperationStruct_tAggregateRow_9 { // G_OutBegin_AggR_100 + + private static final int DEFAULT_HASHCODE = 1; + private static final int PRIME = 31; + private int hashCode = DEFAULT_HASHCODE; + public boolean hashCodeDirty = true; + + java.util.Date history_datetime; + Object vm_id; + String disks_usage_last; + + @Override + public int hashCode() { + if (this.hashCodeDirty) { + final int prime = PRIME; + int result = DEFAULT_HASHCODE; + + result = prime + * result + + ((this.history_datetime == null) ? 0 + : this.history_datetime.hashCode()); + + result = prime + * result + + ((this.vm_id == null) ? 0 : this.vm_id + .hashCode()); + + this.hashCode = result; + this.hashCodeDirty = false; + } + return this.hashCode; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + final AggOperationStruct_tAggregateRow_9 other = (AggOperationStruct_tAggregateRow_9) obj; + + if (this.history_datetime == null) { + if (other.history_datetime != null) + return false; + } else if (!this.history_datetime + .equals(other.history_datetime)) + return false; + + if (this.vm_id == null) { + if (other.vm_id != null) + return false; + } else if (!this.vm_id.equals(other.vm_id)) + return false; + + return true; + } + + } // G_OutBegin_AggR_100 + + AggOperationStruct_tAggregateRow_9 operation_result_tAggregateRow_9 = null; + AggOperationStruct_tAggregateRow_9 operation_finder_tAggregateRow_9 = new AggOperationStruct_tAggregateRow_9(); + java.util.Map<AggOperationStruct_tAggregateRow_9, AggOperationStruct_tAggregateRow_9> hash_tAggregateRow_9 = new java.util.HashMap<AggOperationStruct_tAggregateRow_9, AggOperationStruct_tAggregateRow_9>(); /** - * [tJDBCOutput_9 begin ] stop + * [tAggregateRow_9_AGGOUT begin ] stop */ /** @@ -19875,7 +20504,7 @@ // ############################### // # Outputs initialization - disks_usage_dailyStruct disks_usage_daily_tmp = new disks_usage_dailyStruct(); + disks_usage_aggregateStruct disks_usage_aggregate_tmp = new disks_usage_aggregateStruct(); // ############################### /** @@ -19901,11 +20530,11 @@ java.sql.Statement stmt_tJDBCInput_9 = conn_tJDBCInput_9 .createStatement(); - String dbquery_tJDBCInput_9 = "SELECT date_trunc('day', history_datetime), vm_id, disks_usage FROM vm_disks_usage_hourly_history WHERE history_id in (SELECT max(history_id) FROM vm_disks_usage_hourly_history GROUP BY vm_id, date_trunc('day', history_datetime)) AND history_datetime >= '" + String dbquery_tJDBCInput_9 = "SELECT history_datetime, vm_id, disks_usage FROM vm_disks_usage_hourly_history WHERE history_datetime >= '" + context.lastDayAggr + "' AND history_datetime < '" + TalendDate.addDate(context.lastDayAggr, 1, "dd") - + "' "; + + "' ORDER BY history_datetime, vm_id"; globalMap.put("tJDBCInput_9_QUERY", dbquery_tJDBCInput_9); java.sql.ResultSet rs_tJDBCInput_9 = null; @@ -20013,13 +20642,14 @@ // ############################### // # Output tables - disks_usage_daily = null; + disks_usage_aggregate = null; - // # Output table : 'disks_usage_daily' - disks_usage_daily_tmp.history_datetime = row12.history_datetime; - disks_usage_daily_tmp.vm_id = row12.vm_id; - disks_usage_daily_tmp.disks_usage = row12.disks_usage; - disks_usage_daily = disks_usage_daily_tmp; + // # Output table : 'disks_usage_aggregate' + disks_usage_aggregate_tmp.history_datetime = RoutineHistoryETL + .startOfDay(row12.history_datetime); + disks_usage_aggregate_tmp.vm_id = row12.vm_id; + disks_usage_aggregate_tmp.disks_usage = row12.disks_usage; + disks_usage_aggregate = disks_usage_aggregate_tmp; // ############################### } // end of Var scope @@ -20031,60 +20661,55 @@ /** * [tMap_9 main ] stop */ - // Start of branch "disks_usage_daily" - if (disks_usage_daily != null) { + // Start of branch "disks_usage_aggregate" + if (disks_usage_aggregate != null) { /** - * [tJDBCOutput_9 main ] start + * [tAggregateRow_9_AGGOUT main ] start */ - currentComponent = "tJDBCOutput_9"; + currentVirtualComponent = "tAggregateRow_9"; - whetherReject_tJDBCOutput_9 = false; - if (disks_usage_daily.history_datetime != null) { - pstmt_tJDBCOutput_9 - .setTimestamp( - 1, - new java.sql.Timestamp( - disks_usage_daily.history_datetime - .getTime())); - } else { - pstmt_tJDBCOutput_9.setNull(1, - java.sql.Types.DATE); - } + currentComponent = "tAggregateRow_9_AGGOUT"; - if (disks_usage_daily.vm_id == null) { - pstmt_tJDBCOutput_9.setNull(2, - java.sql.Types.OTHER); - } else { - pstmt_tJDBCOutput_9.setObject(2, - disks_usage_daily.vm_id); - } + operation_finder_tAggregateRow_9.history_datetime = disks_usage_aggregate.history_datetime; + operation_finder_tAggregateRow_9.vm_id = disks_usage_aggregate.vm_id; - if (disks_usage_daily.disks_usage == null) { - pstmt_tJDBCOutput_9.setNull(3, - java.sql.Types.VARCHAR); - } else { - pstmt_tJDBCOutput_9.setString(3, - disks_usage_daily.disks_usage); - } + operation_finder_tAggregateRow_9.hashCodeDirty = true; - try { - insertedCount_tJDBCOutput_9 = insertedCount_tJDBCOutput_9 - + pstmt_tJDBCOutput_9.executeUpdate(); - nb_line_tJDBCOutput_9++; - } catch (java.lang.Exception e) { - whetherReject_tJDBCOutput_9 = true; - throw (e); - } + operation_result_tAggregateRow_9 = hash_tAggregateRow_9 + .get(operation_finder_tAggregateRow_9); - tos_count_tJDBCOutput_9++; + boolean isFirstAdd_tAggregateRow_9 = false; + + if (operation_result_tAggregateRow_9 == null) { // G_OutMain_AggR_001 + + operation_result_tAggregateRow_9 = new AggOperationStruct_tAggregateRow_9(); + + operation_result_tAggregateRow_9.history_datetime = operation_finder_tAggregateRow_9.history_datetime; + operation_result_tAggregateRow_9.vm_id = operation_finder_tAggregateRow_9.vm_id; + + isFirstAdd_tAggregateRow_9 = true; + + hash_tAggregateRow_9.put( + operation_result_tAggregateRow_9, + operation_result_tAggregateRow_9); + + } // G_OutMain_AggR_001 + + if (disks_usage_aggregate.disks_usage != null) { // G_OutMain_AggR_546 + + operation_result_tAggregateRow_9.disks_usage_last = disks_usage_aggregate.disks_usage; + + } // G_OutMain_AggR_546 + + tos_count_tAggregateRow_9_AGGOUT++; /** - * [tJDBCOutput_9 main ] stop + * [tAggregateRow_9_AGGOUT main ] stop */ - } // End of branch "disks_usage_daily" + } // End of branch "disks_usage_aggregate" /** * [tJDBCInput_9 end ] start @@ -20122,6 +20747,169 @@ /** * [tMap_9 end ] stop + */ + + /** + * [tAggregateRow_9_AGGOUT end ] start + */ + + currentVirtualComponent = "tAggregateRow_9"; + + currentComponent = "tAggregateRow_9_AGGOUT"; + + ok_Hash.put("tAggregateRow_9_AGGOUT", true); + end_Hash.put("tAggregateRow_9_AGGOUT", + System.currentTimeMillis()); + + /** + * [tAggregateRow_9_AGGOUT end ] stop + */ + + /** + * [tJDBCOutput_9 begin ] start + */ + + ok_Hash.put("tJDBCOutput_9", false); + start_Hash.put("tJDBCOutput_9", System.currentTimeMillis()); + + currentComponent = "tJDBCOutput_9"; + + int tos_count_tJDBCOutput_9 = 0; + + int nb_line_tJDBCOutput_9 = 0; + int nb_line_update_tJDBCOutput_9 = 0; + int nb_line_inserted_tJDBCOutput_9 = 0; + int nb_line_deleted_tJDBCOutput_9 = 0; + int nb_line_rejected_tJDBCOutput_9 = 0; + + int tmp_batchUpdateCount_tJDBCOutput_9 = 0; + + int deletedCount_tJDBCOutput_9 = 0; + int updatedCount_tJDBCOutput_9 = 0; + int insertedCount_tJDBCOutput_9 = 0; + int rejectedCount_tJDBCOutput_9 = 0; + + boolean whetherReject_tJDBCOutput_9 = false; + + java.sql.Connection connection_tJDBCOutput_9 = (java.sql.Connection) globalMap + .get("conn_tJDBCConnection_1"); + int batchSize_tJDBCOutput_9 = 10000; + int batchSizeCounter_tJDBCOutput_9 = 0; + + String insert_tJDBCOutput_9 = "INSERT INTO " + + "vm_disks_usage_daily_history" + + " (history_datetime,vm_id,disks_usage) VALUES (?,?,?)"; + java.sql.PreparedStatement pstmt_tJDBCOutput_9 = connection_tJDBCOutput_9 + .prepareStatement(insert_tJDBCOutput_9); + + /** + * [tJDBCOutput_9 begin ] stop + */ + + /** + * [tAggregateRow_9_AGGIN begin ] start + */ + + ok_Hash.put("tAggregateRow_9_AGGIN", false); + start_Hash.put("tAggregateRow_9_AGGIN", + System.currentTimeMillis()); + + currentVirtualComponent = "tAggregateRow_9"; + + currentComponent = "tAggregateRow_9_AGGIN"; + + int tos_count_tAggregateRow_9_AGGIN = 0; + + java.util.Collection<AggOperationStruct_tAggregateRow_9> values_tAggregateRow_9 = hash_tAggregateRow_9 + .values(); + + globalMap.put("tAggregateRow_9_NB_LINE", + values_tAggregateRow_9.size()); + + for (AggOperationStruct_tAggregateRow_9 aggregated_row_tAggregateRow_9 : values_tAggregateRow_9) { // G_AggR_600 + + /** + * [tAggregateRow_9_AGGIN begin ] stop + */ + /** + * [tAggregateRow_9_AGGIN main ] start + */ + + currentVirtualComponent = "tAggregateRow_9"; + + currentComponent = "tAggregateRow_9_AGGIN"; + + row15.history_datetime = aggregated_row_tAggregateRow_9.history_datetime; + + row15.vm_id = aggregated_row_tAggregateRow_9.vm_id; + + row15.disks_usage = aggregated_row_tAggregateRow_9.disks_usage_last; + + tos_count_tAggregateRow_9_AGGIN++; + + /** + * [tAggregateRow_9_AGGIN main ] stop + */ + + /** + * [tJDBCOutput_9 main ] start + */ + + currentComponent = "tJDBCOutput_9"; + + whetherReject_tJDBCOutput_9 = false; + if (row15.history_datetime != null) { + pstmt_tJDBCOutput_9.setTimestamp( + 1, + new java.sql.Timestamp(row15.history_datetime + .getTime())); + } else { + pstmt_tJDBCOutput_9.setNull(1, java.sql.Types.DATE); + } + + if (row15.vm_id == null) { + pstmt_tJDBCOutput_9.setNull(2, java.sql.Types.OTHER); + } else { + pstmt_tJDBCOutput_9.setObject(2, row15.vm_id); + } + + if (row15.disks_usage == null) { + pstmt_tJDBCOutput_9.setNull(3, java.sql.Types.VARCHAR); + } else { + pstmt_tJDBCOutput_9.setString(3, row15.disks_usage); + } + + try { + insertedCount_tJDBCOutput_9 = insertedCount_tJDBCOutput_9 + + pstmt_tJDBCOutput_9.executeUpdate(); + nb_line_tJDBCOutput_9++; + } catch (java.lang.Exception e) { + whetherReject_tJDBCOutput_9 = true; + throw (e); + } + + tos_count_tJDBCOutput_9++; + + /** + * [tJDBCOutput_9 main ] stop + */ + + /** + * [tAggregateRow_9_AGGIN end ] start + */ + + currentVirtualComponent = "tAggregateRow_9"; + + currentComponent = "tAggregateRow_9_AGGIN"; + + } // G_AggR_600 + + ok_Hash.put("tAggregateRow_9_AGGIN", true); + end_Hash.put("tAggregateRow_9_AGGIN", + System.currentTimeMillis()); + + /** + * [tAggregateRow_9_AGGIN end ] stop */ /** @@ -20169,11 +20957,16 @@ TalendException te = new TalendException(e, currentComponent, globalMap); + te.setVirtualComponentName(currentVirtualComponent); + throw te; } catch (java.lang.Error error) { throw error; } finally { + + // free memory for "tAggregateRow_9_AGGIN" + globalMap.remove("tAggregateRow_9"); try { @@ -20195,6 +20988,30 @@ /** * [tMap_9 finally ] stop + */ + + /** + * [tAggregateRow_9_AGGOUT finally ] start + */ + + currentVirtualComponent = "tAggregateRow_9"; + + currentComponent = "tAggregateRow_9_AGGOUT"; + + /** + * [tAggregateRow_9_AGGOUT finally ] stop + */ + + /** + * [tAggregateRow_9_AGGIN finally ] start + */ + + currentVirtualComponent = "tAggregateRow_9"; + + currentComponent = "tAggregateRow_9_AGGIN"; + + /** + * [tAggregateRow_9_AGGIN finally ] stop */ /** @@ -25659,6 +26476,6 @@ ResumeUtil resumeUtil = null; } /************************************************************************************************ - * 738865 characters generated by Talend Open Studio for Data Integration on the - * August 10, 2014 3:08:10 PM IDT + * 760360 characters generated by Talend Open Studio for Data Integration on the + * March 16, 2015 11:54:06 AM IST ************************************************************************************************/ diff --git a/etl_export/src/ovirt_engine_dwh/aggregationtohourly_3_5/AggregationToHourly.java b/etl_export/src/ovirt_engine_dwh/aggregationtohourly_3_5/AggregationToHourly.java index 26e8912..291c4c0 100644 --- a/etl_export/src/ovirt_engine_dwh/aggregationtohourly_3_5/AggregationToHourly.java +++ b/etl_export/src/ovirt_engine_dwh/aggregationtohourly_3_5/AggregationToHourly.java @@ -852,6 +852,26 @@ tJDBCInput_13_onSubJobError(exception, errorComponent, globalMap); } + public void tAggregateRow_9_AGGOUT_error(java.lang.Exception exception, + String errorComponent, final java.util.Map<String, Object> globalMap) + throws TalendException { + end_Hash.put("tAggregateRow_9_AGGOUT", System.currentTimeMillis()); + + ((java.util.Map) threadLocal.get()).put("status", "failure"); + + tJDBCInput_9_onSubJobError(exception, errorComponent, globalMap); + } + + public void tAggregateRow_9_AGGIN_error(java.lang.Exception exception, + String errorComponent, final java.util.Map<String, Object> globalMap) + throws TalendException { + end_Hash.put("tAggregateRow_9_AGGIN", System.currentTimeMillis()); + + ((java.util.Map) threadLocal.get()).put("status", "failure"); + + tJDBCInput_9_onSubJobError(exception, errorComponent, globalMap); + } + public void tAggregateRow_8_AGGOUT_error(java.lang.Exception exception, String errorComponent, final java.util.Map<String, Object> globalMap) throws TalendException { @@ -20017,8 +20037,8 @@ globalMap.put("tRowGenerator_1_SUBPROCESS_STATE", 1); } - public static class disks_usage_hourlyStruct implements - routines.system.IPersistableRow<disks_usage_hourlyStruct> { + public static class row15Struct implements + routines.system.IPersistableRow<row15Struct> { final static byte[] commonByteArrayLock_OVIRT_ENGINE_DWH_AggregationToHourly = new byte[0]; static byte[] commonByteArray_OVIRT_ENGINE_DWH_AggregationToHourly = new byte[0]; @@ -20162,7 +20182,359 @@ /** * Compare keys */ - public int compareTo(disks_usage_hourlyStruct other) { + public int compareTo(row15Struct other) { + + int returnValue = -1; + + return returnValue; + } + + private int checkNullsAndCompare(Object object1, Object object2) { + int returnValue = 0; + if (object1 instanceof Comparable && object2 instanceof Comparable) { + returnValue = ((Comparable) object1).compareTo(object2); + } else if (object1 != null && object2 != null) { + returnValue = compareStrings(object1.toString(), + object2.toString()); + } else if (object1 == null && object2 != null) { + returnValue = 1; + } else if (object1 != null && object2 == null) { + returnValue = -1; + } else { + returnValue = 0; + } + + return returnValue; + } + + private int compareStrings(String string1, String string2) { + return string1.compareTo(string2); + } + + } + + public static class OnRowsEndStructtAggregateRow_9 implements + routines.system.IPersistableRow<OnRowsEndStructtAggregateRow_9> { + final static byte[] commonByteArrayLock_OVIRT_ENGINE_DWH_AggregationToHourly = new byte[0]; + static byte[] commonByteArray_OVIRT_ENGINE_DWH_AggregationToHourly = new byte[0]; + + public java.util.Date history_datetime; + + public java.util.Date getHistory_datetime() { + return this.history_datetime; + } + + public Object vm_id; + + public Object getVm_id() { + return this.vm_id; + } + + public String disks_usage; + + public String getDisks_usage() { + return this.disks_usage; + } + + private java.util.Date readDate(ObjectInputStream dis) + throws IOException { + java.util.Date dateReturn = null; + int length = 0; + length = dis.readByte(); + if (length == -1) { + dateReturn = null; + } else { + dateReturn = new Date(dis.readLong()); + } + return dateReturn; + } + + private void writeDate(java.util.Date date1, ObjectOutputStream dos) + throws IOException { + if (date1 == null) { + dos.writeByte(-1); + } else { + dos.writeByte(0); + dos.writeLong(date1.getTime()); + } + } + + private String readString(ObjectInputStream dis) throws IOException { + String strReturn = null; + int length = 0; + length = dis.readInt(); + if (length == -1) { + strReturn = null; + } else { + if (length > commonByteArray_OVIRT_ENGINE_DWH_AggregationToHourly.length) { + if (length < 1024 + && commonByteArray_OVIRT_ENGINE_DWH_AggregationToHourly.length == 0) { + commonByteArray_OVIRT_ENGINE_DWH_AggregationToHourly = new byte[1024]; + } else { + commonByteArray_OVIRT_ENGINE_DWH_AggregationToHourly = new byte[2 * length]; + } + } + dis.readFully( + commonByteArray_OVIRT_ENGINE_DWH_AggregationToHourly, + 0, length); + strReturn = new String( + commonByteArray_OVIRT_ENGINE_DWH_AggregationToHourly, + 0, length, utf8Charset); + } + return strReturn; + } + + private void writeString(String str, ObjectOutputStream dos) + throws IOException { + if (str == null) { + dos.writeInt(-1); + } else { + byte[] byteArray = str.getBytes(utf8Charset); + dos.writeInt(byteArray.length); + dos.write(byteArray); + } + } + + public void readData(ObjectInputStream dis) { + + synchronized (commonByteArrayLock_OVIRT_ENGINE_DWH_AggregationToHourly) { + + try { + + int length = 0; + + this.history_datetime = readDate(dis); + + this.vm_id = (Object) dis.readObject(); + + this.disks_usage = readString(dis); + + } catch (IOException e) { + throw new RuntimeException(e); + + } catch (ClassNotFoundException eCNFE) { + throw new RuntimeException(eCNFE); + + } + + } + + } + + public void writeData(ObjectOutputStream dos) { + try { + + // java.util.Date + + writeDate(this.history_datetime, dos); + + // Object + + dos.writeObject(this.vm_id); + + // String + + writeString(this.disks_usage, dos); + + } catch (IOException e) { + throw new RuntimeException(e); + } + + } + + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append(super.toString()); + sb.append("["); + sb.append("history_datetime=" + String.valueOf(history_datetime)); + sb.append(",vm_id=" + String.valueOf(vm_id)); + sb.append(",disks_usage=" + disks_usage); + sb.append("]"); + + return sb.toString(); + } + + /** + * Compare keys + */ + public int compareTo(OnRowsEndStructtAggregateRow_9 other) { + + int returnValue = -1; + + return returnValue; + } + + private int checkNullsAndCompare(Object object1, Object object2) { + int returnValue = 0; + if (object1 instanceof Comparable && object2 instanceof Comparable) { + returnValue = ((Comparable) object1).compareTo(object2); + } else if (object1 != null && object2 != null) { + returnValue = compareStrings(object1.toString(), + object2.toString()); + } else if (object1 == null && object2 != null) { + returnValue = 1; + } else if (object1 != null && object2 == null) { + returnValue = -1; + } else { + returnValue = 0; + } + + return returnValue; + } + + private int compareStrings(String string1, String string2) { + return string1.compareTo(string2); + } + + } + + public static class disks_usage_aggregateStruct implements + routines.system.IPersistableRow<disks_usage_aggregateStruct> { + final static byte[] commonByteArrayLock_OVIRT_ENGINE_DWH_AggregationToHourly = new byte[0]; + static byte[] commonByteArray_OVIRT_ENGINE_DWH_AggregationToHourly = new byte[0]; + + public java.util.Date history_datetime; + + public java.util.Date getHistory_datetime() { + return this.history_datetime; + } + + public Object vm_id; + + public Object getVm_id() { + return this.vm_id; + } + + public String disks_usage; + + public String getDisks_usage() { + return this.disks_usage; + } + + private java.util.Date readDate(ObjectInputStream dis) + throws IOException { + java.util.Date dateReturn = null; + int length = 0; + length = dis.readByte(); + if (length == -1) { + dateReturn = null; + } else { + dateReturn = new Date(dis.readLong()); + } + return dateReturn; + } + + private void writeDate(java.util.Date date1, ObjectOutputStream dos) + throws IOException { + if (date1 == null) { + dos.writeByte(-1); + } else { + dos.writeByte(0); + dos.writeLong(date1.getTime()); + } + } + + private String readString(ObjectInputStream dis) throws IOException { + String strReturn = null; + int length = 0; + length = dis.readInt(); + if (length == -1) { + strReturn = null; + } else { + if (length > commonByteArray_OVIRT_ENGINE_DWH_AggregationToHourly.length) { + if (length < 1024 + && commonByteArray_OVIRT_ENGINE_DWH_AggregationToHourly.length == 0) { + commonByteArray_OVIRT_ENGINE_DWH_AggregationToHourly = new byte[1024]; + } else { + commonByteArray_OVIRT_ENGINE_DWH_AggregationToHourly = new byte[2 * length]; + } + } + dis.readFully( + commonByteArray_OVIRT_ENGINE_DWH_AggregationToHourly, + 0, length); + strReturn = new String( + commonByteArray_OVIRT_ENGINE_DWH_AggregationToHourly, + 0, length, utf8Charset); + } + return strReturn; + } + + private void writeString(String str, ObjectOutputStream dos) + throws IOException { + if (str == null) { + dos.writeInt(-1); + } else { + byte[] byteArray = str.getBytes(utf8Charset); + dos.writeInt(byteArray.length); + dos.write(byteArray); + } + } + + public void readData(ObjectInputStream dis) { + + synchronized (commonByteArrayLock_OVIRT_ENGINE_DWH_AggregationToHourly) { + + try { + + int length = 0; + + this.history_datetime = readDate(dis); + + this.vm_id = (Object) dis.readObject(); + + this.disks_usage = readString(dis); + + } catch (IOException e) { + throw new RuntimeException(e); + + } catch (ClassNotFoundException eCNFE) { + throw new RuntimeException(eCNFE); + + } + + } + + } + + public void writeData(ObjectOutputStream dos) { + try { + + // java.util.Date + + writeDate(this.history_datetime, dos); + + // Object + + dos.writeObject(this.vm_id); + + // String + + writeString(this.disks_usage, dos); + + } catch (IOException e) { + throw new RuntimeException(e); + } + + } + + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append(super.toString()); + sb.append("["); + sb.append("history_datetime=" + String.valueOf(history_datetime)); + sb.append(",vm_id=" + String.valueOf(vm_id)); + sb.append(",disks_usage=" + disks_usage); + sb.append("]"); + + return sb.toString(); + } + + /** + * Compare keys + */ + public int compareTo(disks_usage_aggregateStruct other) { int returnValue = -1; @@ -20375,6 +20747,7 @@ globalMap.put("tJDBCInput_9_SUBPROCESS_STATE", 0); final boolean execStat = this.execStat; + String currentVirtualComponent = null; String iterateId = ""; int iterateLoop = 0; @@ -20392,47 +20765,303 @@ globalResumeTicket = true; row12Struct row12 = new row12Struct(); - disks_usage_hourlyStruct disks_usage_hourly = new disks_usage_hourlyStruct(); + disks_usage_aggregateStruct disks_usage_aggregate = new disks_usage_aggregateStruct(); + row15Struct row15 = new row15Struct(); /** - * [tJDBCOutput_9 begin ] start + * [tAggregateRow_9_AGGOUT begin ] start */ - ok_Hash.put("tJDBCOutput_9", false); - start_Hash.put("tJDBCOutput_9", System.currentTimeMillis()); + ok_Hash.put("tAggregateRow_9_AGGOUT", false); + start_Hash.put("tAggregateRow_9_AGGOUT", + System.currentTimeMillis()); - currentComponent = "tJDBCOutput_9"; + currentVirtualComponent = "tAggregateRow_9"; - int tos_count_tJDBCOutput_9 = 0; + currentComponent = "tAggregateRow_9_AGGOUT"; - int nb_line_tJDBCOutput_9 = 0; - int nb_line_update_tJDBCOutput_9 = 0; - int nb_line_inserted_tJDBCOutput_9 = 0; - int nb_line_deleted_tJDBCOutput_9 = 0; - int nb_line_rejected_tJDBCOutput_9 = 0; + int tos_count_tAggregateRow_9_AGGOUT = 0; - int tmp_batchUpdateCount_tJDBCOutput_9 = 0; + // ------------ - int deletedCount_tJDBCOutput_9 = 0; - int updatedCount_tJDBCOutput_9 = 0; - int insertedCount_tJDBCOutput_9 = 0; - int rejectedCount_tJDBCOutput_9 = 0; + java.util.Map hashAggreg_tAggregateRow_9 = new java.util.HashMap(); - boolean whetherReject_tJDBCOutput_9 = false; + // ------------ - java.sql.Connection connection_tJDBCOutput_9 = (java.sql.Connection) globalMap - .get("conn_tJDBCConnection_1"); - int batchSize_tJDBCOutput_9 = 10000; - int batchSizeCounter_tJDBCOutput_9 = 0; + class UtilClass_tAggregateRow_9 { // G_OutBegin_AggR_144 - String insert_tJDBCOutput_9 = "INSERT INTO " - + "vm_disks_usage_hourly_history" - + " (history_datetime,vm_id,disks_usage) VALUES (?,?,?)"; - java.sql.PreparedStatement pstmt_tJDBCOutput_9 = connection_tJDBCOutput_9 - .prepareStatement(insert_tJDBCOutput_9); + public double sd(Double[] data) { + final int n = data.length; + if (n < 2) { + return Double.NaN; + } + double d1 = 0d; + double d2 = 0d; + + for (int i = 0; i < data.length; i++) { + d1 += (data[i] * data[i]); + d2 += data[i]; + } + + return Math.sqrt((n * d1 - d2 * d2) / n / (n - 1)); + } + + public void checkedIADD(byte a, byte b, + boolean checkTypeOverFlow, boolean checkUlp) { + byte r = (byte) (a + b); + if (checkTypeOverFlow && ((a ^ r) & (b ^ r)) < 0) { + + throw new RuntimeException(buildOverflowMessage( + String.valueOf(a), String.valueOf(b), + "'short/Short'", "'int/Integer'")); + } + } + + public void checkedIADD(short a, short b, + boolean checkTypeOverFlow, boolean checkUlp) { + short r = (short) (a + b); + if (checkTypeOverFlow && ((a ^ r) & (b ^ r)) < 0) { + + throw new RuntimeException(buildOverflowMessage( + String.valueOf(a), String.valueOf(b), + "'int/Integer'", "'short/Short'")); + } + } + + public void checkedIADD(int a, int b, + boolean checkTypeOverFlow, boolean checkUlp) { + int r = a + b; + if (checkTypeOverFlow && ((a ^ r) & (b ^ r)) < 0) { + + throw new RuntimeException(buildOverflowMessage( + String.valueOf(a), String.valueOf(b), + "'long/Long'", "'int/Integer'")); + } + } + + public void checkedIADD(long a, long b, + boolean checkTypeOverFlow, boolean checkUlp) { + long r = a + b; + if (checkTypeOverFlow && ((a ^ r) & (b ^ r)) < 0) { + throw new RuntimeException(buildOverflowMessage( + String.valueOf(a), String.valueOf(b), + "'BigDecimal'", "'long/Long'")); + } + } + + public void checkedIADD(float a, float b, + boolean checkTypeOverFlow, boolean checkUlp) { + + if (checkUlp) { + float minAddedValue = Math.ulp(a); + if (minAddedValue > Math.abs(b)) { + + throw new RuntimeException( + buildPrecisionMessage( + String.valueOf(a), + String.valueOf(b), + "'double' or 'BigDecimal'", + "'float/Float'")); + } + } + + if (checkTypeOverFlow + && ((double) a + (double) b > (double) Float.MAX_VALUE) + || ((double) a + (double) b < (double) -Float.MAX_VALUE)) { + + throw new RuntimeException( + buildOverflowMessage(String.valueOf(a), + String.valueOf(b), + "'double' or 'BigDecimal'", + "'float/Float'")); + } + } + + public void checkedIADD(double a, double b, + boolean checkTypeOverFlow, boolean checkUlp) { + + if (checkUlp) { + double minAddedValue = Math.ulp(a); + if (minAddedValue > Math.abs(b)) { + + throw new RuntimeException( + buildPrecisionMessage( + String.valueOf(a), + String.valueOf(a), + "'BigDecimal'", + "'double/Double'")); + } + } + + if (checkTypeOverFlow + && (a + b > (double) Double.MAX_VALUE) + || (a + b < -Double.MAX_VALUE)) { + + throw new RuntimeException(buildOverflowMessage( + String.valueOf(a), String.valueOf(b), + "'BigDecimal'", "'double/Double'")); + } + } + + public void checkedIADD(double a, byte b, + boolean checkTypeOverFlow, boolean checkUlp) { + + if (checkTypeOverFlow + && (a + b > (double) Double.MAX_VALUE) + || (a + b < -Double.MAX_VALUE)) { + + throw new RuntimeException(buildOverflowMessage( + String.valueOf(a), String.valueOf(b), + "'BigDecimal'", "'double/Double'")); + } + } + + public void checkedIADD(double a, short b, + boolean checkTypeOverFlow, boolean checkUlp) { + + if (checkTypeOverFlow + && (a + b > (double) Double.MAX_VALUE) + || (a + b < -Double.MAX_VALUE)) { + + throw new RuntimeException(buildOverflowMessage( + String.valueOf(a), String.valueOf(b), + "'BigDecimal'", "'double/Double'")); + } + } + + public void checkedIADD(double a, int b, + boolean checkTypeOverFlow, boolean checkUlp) { + + if (checkTypeOverFlow + && (a + b > (double) Double.MAX_VALUE) + || (a + b < -Double.MAX_VALUE)) { + + throw new RuntimeException(buildOverflowMessage( + String.valueOf(a), String.valueOf(b), + "'BigDecimal'", "'double/Double'")); + } + } + + public void checkedIADD(double a, float b, + boolean checkTypeOverFlow, boolean checkUlp) { + + if (checkUlp) { + double minAddedValue = Math.ulp(a); + if (minAddedValue > Math.abs(b)) { + + throw new RuntimeException( + buildPrecisionMessage( + String.valueOf(a), + String.valueOf(a), + "'BigDecimal'", + "'double/Double'")); + } + } + + if (checkTypeOverFlow + && (a + b > (double) Double.MAX_VALUE) + || (a + b < -Double.MAX_VALUE)) { + + throw new RuntimeException(buildOverflowMessage( + String.valueOf(a), String.valueOf(b), + "'BigDecimal'", "'double/Double'")); + } + } + + private String buildOverflowMessage(String a, String b, + String advicedTypes, String originalType) { + return "Type overflow when adding " + + b + + " to " + + a + + ", to resolve this problem, increase the precision by using " + + advicedTypes + " type in place of " + + originalType + "."; + } + + private String buildPrecisionMessage(String a, String b, + String advicedTypes, String originalType) { + return "The double precision is unsufficient to add the value " + + b + + " to " + + a + + ", to resolve this problem, increase the precision by using " + + advicedTypes + + " type in place of " + + originalType + "."; + } + + } // G_OutBegin_AggR_144 + + UtilClass_tAggregateRow_9 utilClass_tAggregateRow_9 = new UtilClass_tAggregateRow_9(); + + class AggOperationStruct_tAggregateRow_9 { // G_OutBegin_AggR_100 + + private static final int DEFAULT_HASHCODE = 1; + private static final int PRIME = 31; + private int hashCode = DEFAULT_HASHCODE; + public boolean hashCodeDirty = true; + + java.util.Date history_datetime; + Object vm_id; + String disks_usage_last; + + @Override + public int hashCode() { + if (this.hashCodeDirty) { + final int prime = PRIME; + int result = DEFAULT_HASHCODE; + + result = prime + * result + + ((this.history_datetime == null) ? 0 + : this.history_datetime.hashCode()); + + result = prime + * result + + ((this.vm_id == null) ? 0 : this.vm_id + .hashCode()); + + this.hashCode = result; + this.hashCodeDirty = false; + } + return this.hashCode; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + final AggOperationStruct_tAggregateRow_9 other = (AggOperationStruct_tAggregateRow_9) obj; + + if (this.history_datetime == null) { + if (other.history_datetime != null) + return false; + } else if (!this.history_datetime + .equals(other.history_datetime)) + return false; + + if (this.vm_id == null) { + if (other.vm_id != null) + return false; + } else if (!this.vm_id.equals(other.vm_id)) + return false; + + return true; + } + + } // G_OutBegin_AggR_100 + + AggOperationStruct_tAggregateRow_9 operation_result_tAggregateRow_9 = null; + AggOperationStruct_tAggregateRow_9 operation_finder_tAggregateRow_9 = new AggOperationStruct_tAggregateRow_9(); + java.util.Map<AggOperationStruct_tAggregateRow_9, AggOperationStruct_tAggregateRow_9> hash_tAggregateRow_9 = new java.util.HashMap<AggOperationStruct_tAggregateRow_9, AggOperationStruct_tAggregateRow_9>(); /** - * [tJDBCOutput_9 begin ] stop + * [tAggregateRow_9_AGGOUT begin ] stop */ /** @@ -20459,7 +21088,7 @@ // ############################### // # Outputs initialization - disks_usage_hourlyStruct disks_usage_hourly_tmp = new disks_usage_hourlyStruct(); + disks_usage_aggregateStruct disks_usage_aggregate_tmp = new disks_usage_aggregateStruct(); // ############################### /** @@ -20485,11 +21114,11 @@ java.sql.Statement stmt_tJDBCInput_9 = conn_tJDBCInput_9 .createStatement(); - String dbquery_tJDBCInput_9 = "SELECT date_trunc('hour', history_datetime), vm_id, disks_usage FROM vm_disks_usage_samples_history WHERE history_id in (SELECT max(history_id) FROM vm_disks_usage_samples_history GROUP BY vm_id, date_trunc('hour', history_datetime)) AND history_datetime >= '" + String dbquery_tJDBCInput_9 = "SELECT history_datetime, vm_id, disks_usage FROM vm_disks_usage_samples_history WHERE history_datetime >= '" + context.lastHourAggr + "' AND history_datetime < '" + TalendDate.addDate(context.lastHourAggr, 1, "HH") - + "' "; + + "' ORDER BY history_datetime, vm_id"; globalMap.put("tJDBCInput_9_QUERY", dbquery_tJDBCInput_9); java.sql.ResultSet rs_tJDBCInput_9 = null; @@ -20597,13 +21226,14 @@ // ############################### // # Output tables - disks_usage_hourly = null; + disks_usage_aggregate = null; - // # Output table : 'disks_usage_hourly' - disks_usage_hourly_tmp.history_datetime = row12.history_datetime; - disks_usage_hourly_tmp.vm_id = row12.vm_id; - disks_usage_hourly_tmp.disks_usage = row12.disks_usage; - disks_usage_hourly = disks_usage_hourly_tmp; + // # Output table : 'disks_usage_aggregate' + disks_usage_aggregate_tmp.history_datetime = RoutineHistoryETL + .startOfHour(row12.history_datetime); + disks_usage_aggregate_tmp.vm_id = row12.vm_id; + disks_usage_aggregate_tmp.disks_usage = row12.disks_usage; + disks_usage_aggregate = disks_usage_aggregate_tmp; // ############################### } // end of Var scope @@ -20615,60 +21245,55 @@ /** * [tMap_9 main ] stop */ - // Start of branch "disks_usage_hourly" - if (disks_usage_hourly != null) { + // Start of branch "disks_usage_aggregate" + if (disks_usage_aggregate != null) { /** - * [tJDBCOutput_9 main ] start + * [tAggregateRow_9_AGGOUT main ] start */ - currentComponent = "tJDBCOutput_9"; + currentVirtualComponent = "tAggregateRow_9"; - whetherReject_tJDBCOutput_9 = false; - if (disks_usage_hourly.history_datetime != null) { - pstmt_tJDBCOutput_9 - .setTimestamp( - 1, - new java.sql.Timestamp( - disks_usage_hourly.history_datetime - .getTime())); - } else { - pstmt_tJDBCOutput_9.setNull(1, - java.sql.Types.DATE); - } + currentComponent = "tAggregateRow_9_AGGOUT"; - if (disks_usage_hourly.vm_id == null) { - pstmt_tJDBCOutput_9.setNull(2, - java.sql.Types.OTHER); - } else { - pstmt_tJDBCOutput_9.setObject(2, - disks_usage_hourly.vm_id); - } + operation_finder_tAggregateRow_9.history_datetime = disks_usage_aggregate.history_datetime; + operation_finder_tAggregateRow_9.vm_id = disks_usage_aggregate.vm_id; - if (disks_usage_hourly.disks_usage == null) { - pstmt_tJDBCOutput_9.setNull(3, - java.sql.Types.VARCHAR); - } else { - pstmt_tJDBCOutput_9.setString(3, - disks_usage_hourly.disks_usage); - } + operation_finder_tAggregateRow_9.hashCodeDirty = true; - try { - insertedCount_tJDBCOutput_9 = insertedCount_tJDBCOutput_9 - + pstmt_tJDBCOutput_9.executeUpdate(); - nb_line_tJDBCOutput_9++; - } catch (java.lang.Exception e) { - whetherReject_tJDBCOutput_9 = true; - throw (e); - } + operation_result_tAggregateRow_9 = hash_tAggregateRow_9 + .get(operation_finder_tAggregateRow_9); - tos_count_tJDBCOutput_9++; + boolean isFirstAdd_tAggregateRow_9 = false; + + if (operation_result_tAggregateRow_9 == null) { // G_OutMain_AggR_001 + + operation_result_tAggregateRow_9 = new AggOperationStruct_tAggregateRow_9(); + + operation_result_tAggregateRow_9.history_datetime = operation_finder_tAggregateRow_9.history_datetime; + operation_result_tAggregateRow_9.vm_id = operation_finder_tAggregateRow_9.vm_id; + + isFirstAdd_tAggregateRow_9 = true; + + hash_tAggregateRow_9.put( + operation_result_tAggregateRow_9, + operation_result_tAggregateRow_9); + + } // G_OutMain_AggR_001 + + if (disks_usage_aggregate.disks_usage != null) { // G_OutMain_AggR_546 + + operation_result_tAggregateRow_9.disks_usage_last = disks_usage_aggregate.disks_usage; + + } // G_OutMain_AggR_546 + + tos_count_tAggregateRow_9_AGGOUT++; /** - * [tJDBCOutput_9 main ] stop + * [tAggregateRow_9_AGGOUT main ] stop */ - } // End of branch "disks_usage_hourly" + } // End of branch "disks_usage_aggregate" /** * [tJDBCInput_9 end ] start @@ -20706,6 +21331,169 @@ /** * [tMap_9 end ] stop + */ + + /** + * [tAggregateRow_9_AGGOUT end ] start + */ + + currentVirtualComponent = "tAggregateRow_9"; + + currentComponent = "tAggregateRow_9_AGGOUT"; + + ok_Hash.put("tAggregateRow_9_AGGOUT", true); + end_Hash.put("tAggregateRow_9_AGGOUT", + System.currentTimeMillis()); + + /** + * [tAggregateRow_9_AGGOUT end ] stop + */ + + /** + * [tJDBCOutput_9 begin ] start + */ + + ok_Hash.put("tJDBCOutput_9", false); + start_Hash.put("tJDBCOutput_9", System.currentTimeMillis()); + + currentComponent = "tJDBCOutput_9"; + + int tos_count_tJDBCOutput_9 = 0; + + int nb_line_tJDBCOutput_9 = 0; + int nb_line_update_tJDBCOutput_9 = 0; + int nb_line_inserted_tJDBCOutput_9 = 0; + int nb_line_deleted_tJDBCOutput_9 = 0; + int nb_line_rejected_tJDBCOutput_9 = 0; + + int tmp_batchUpdateCount_tJDBCOutput_9 = 0; + + int deletedCount_tJDBCOutput_9 = 0; + int updatedCount_tJDBCOutput_9 = 0; + int insertedCount_tJDBCOutput_9 = 0; + int rejectedCount_tJDBCOutput_9 = 0; + + boolean whetherReject_tJDBCOutput_9 = false; + + java.sql.Connection connection_tJDBCOutput_9 = (java.sql.Connection) globalMap + .get("conn_tJDBCConnection_1"); + int batchSize_tJDBCOutput_9 = 10000; + int batchSizeCounter_tJDBCOutput_9 = 0; + + String insert_tJDBCOutput_9 = "INSERT INTO " + + "vm_disks_usage_hourly_history" + + " (history_datetime,vm_id,disks_usage) VALUES (?,?,?)"; + java.sql.PreparedStatement pstmt_tJDBCOutput_9 = connection_tJDBCOutput_9 + .prepareStatement(insert_tJDBCOutput_9); + + /** + * [tJDBCOutput_9 begin ] stop + */ + + /** + * [tAggregateRow_9_AGGIN begin ] start + */ + + ok_Hash.put("tAggregateRow_9_AGGIN", false); + start_Hash.put("tAggregateRow_9_AGGIN", + System.currentTimeMillis()); + + currentVirtualComponent = "tAggregateRow_9"; + + currentComponent = "tAggregateRow_9_AGGIN"; + + int tos_count_tAggregateRow_9_AGGIN = 0; + + java.util.Collection<AggOperationStruct_tAggregateRow_9> values_tAggregateRow_9 = hash_tAggregateRow_9 + .values(); + + globalMap.put("tAggregateRow_9_NB_LINE", + values_tAggregateRow_9.size()); + + for (AggOperationStruct_tAggregateRow_9 aggregated_row_tAggregateRow_9 : values_tAggregateRow_9) { // G_AggR_600 + + /** + * [tAggregateRow_9_AGGIN begin ] stop + */ + /** + * [tAggregateRow_9_AGGIN main ] start + */ + + currentVirtualComponent = "tAggregateRow_9"; + + currentComponent = "tAggregateRow_9_AGGIN"; + + row15.history_datetime = aggregated_row_tAggregateRow_9.history_datetime; + + row15.vm_id = aggregated_row_tAggregateRow_9.vm_id; + + row15.disks_usage = aggregated_row_tAggregateRow_9.disks_usage_last; + + tos_count_tAggregateRow_9_AGGIN++; + + /** + * [tAggregateRow_9_AGGIN main ] stop + */ + + /** + * [tJDBCOutput_9 main ] start + */ + + currentComponent = "tJDBCOutput_9"; + + whetherReject_tJDBCOutput_9 = false; + if (row15.history_datetime != null) { + pstmt_tJDBCOutput_9.setTimestamp( + 1, + new java.sql.Timestamp(row15.history_datetime + .getTime())); + } else { + pstmt_tJDBCOutput_9.setNull(1, java.sql.Types.DATE); + } + + if (row15.vm_id == null) { + pstmt_tJDBCOutput_9.setNull(2, java.sql.Types.OTHER); + } else { + pstmt_tJDBCOutput_9.setObject(2, row15.vm_id); + } + + if (row15.disks_usage == null) { + pstmt_tJDBCOutput_9.setNull(3, java.sql.Types.VARCHAR); + } else { + pstmt_tJDBCOutput_9.setString(3, row15.disks_usage); + } + + try { + insertedCount_tJDBCOutput_9 = insertedCount_tJDBCOutput_9 + + pstmt_tJDBCOutput_9.executeUpdate(); + nb_line_tJDBCOutput_9++; + } catch (java.lang.Exception e) { + whetherReject_tJDBCOutput_9 = true; + throw (e); + } + + tos_count_tJDBCOutput_9++; + + /** + * [tJDBCOutput_9 main ] stop + */ + + /** + * [tAggregateRow_9_AGGIN end ] start + */ + + currentVirtualComponent = "tAggregateRow_9"; + + currentComponent = "tAggregateRow_9_AGGIN"; + + } // G_AggR_600 + + ok_Hash.put("tAggregateRow_9_AGGIN", true); + end_Hash.put("tAggregateRow_9_AGGIN", + System.currentTimeMillis()); + + /** + * [tAggregateRow_9_AGGIN end ] stop */ /** @@ -20753,11 +21541,16 @@ TalendException te = new TalendException(e, currentComponent, globalMap); + te.setVirtualComponentName(currentVirtualComponent); + throw te; } catch (java.lang.Error error) { throw error; } finally { + + // free memory for "tAggregateRow_9_AGGIN" + globalMap.remove("tAggregateRow_9"); try { @@ -20779,6 +21572,30 @@ /** * [tMap_9 finally ] stop + */ + + /** + * [tAggregateRow_9_AGGOUT finally ] start + */ + + currentVirtualComponent = "tAggregateRow_9"; + + currentComponent = "tAggregateRow_9_AGGOUT"; + + /** + * [tAggregateRow_9_AGGOUT finally ] stop + */ + + /** + * [tAggregateRow_9_AGGIN finally ] start + */ + + currentVirtualComponent = "tAggregateRow_9"; + + currentComponent = "tAggregateRow_9_AGGIN"; + + /** + * [tAggregateRow_9_AGGIN finally ] stop */ /** @@ -26198,6 +27015,6 @@ ResumeUtil resumeUtil = null; } /************************************************************************************************ - * 754243 characters generated by Talend Open Studio for Data Integration on the - * August 10, 2014 3:08:08 PM IDT + * 775730 characters generated by Talend Open Studio for Data Integration on the + * March 16, 2015 11:54:05 AM IST ************************************************************************************************/ diff --git a/tos_project/process/AggregationToDaily_3.5.item b/tos_project/process/AggregationToDaily_3.5.item index 682d63e..ea81ee4 100644 --- a/tos_project/process/AggregationToDaily_3.5.item +++ b/tos_project/process/AggregationToDaily_3.5.item @@ -2306,7 +2306,7 @@ <elementParameter field="TECHNICAL" name="QUERYSTORE:REPOSITORY_QUERYSTORE_TYPE" value=""/> <elementParameter field="TECHNICAL" name="QUERYSTORE:QUERYSTORE_TYPE" value="BUILT_IN"/> <elementParameter field="GUESS_SCHEMA" name="GUESS_SCHEMA" value=""""/> - <elementParameter field="MEMO_SQL" name="QUERY" value=""SELECT date_trunc('day', history_datetime), vm_id, disks_usage
FROM vm_disks_usage_hourly_history
WHERE history_id in (SELECT max(history_id)
 FROM vm_disks_usage_hourly_history
 GROUP BY vm_id, date_trunc('day', history_datetime)) 
AND history_datetime >= '"+context.lastDayAggr+"'
AND history_datetime < '"+TalendDate.addDate(context.lastDayAggr, 1,"dd")+"'
""/> + <elementParameter field="MEMO_SQL" name="QUERY" value=""SELECT
 history_datetime,
 vm_id,
 disks_usage
FROM vm_disks_usage_hourly_history
WHERE history_datetime >= '"+context.lastDayAggr+"'
AND history_datetime < '"+TalendDate.addDate(context.lastDayAggr, 1,"dd")+"'
ORDER BY history_datetime,
 vm_id""/> <elementParameter field="LABEL" name="NOTE" value="This option only applies when deploying and running in the Talend Runtime"/> <elementParameter field="CHECK" name="SPECIFY_DATASOURCE_ALIAS" value="false"/> <elementParameter field="TEXT" name="DATASOURCE_ALIAS" value=""""/> @@ -2328,8 +2328,8 @@ <elementParameter field="MEMO" name="COMMENT" value=""/> <elementParameter field="CHECK" name="VALIDATION_RULES" value="false"/> <metadata connector="FLOW" label="vm_disks_usage_samples_history" name="tJDBCInput_9"> - <column comment="" key="false" length="35" name="history_datetime" nullable="false" pattern=""dd-MM-yyyy"" precision="6" sourceType="TIMESTAMPTZ" type="id_Date" usefulColumn="true"/> - <column comment="" key="false" length="2147483647" name="vm_id" nullable="false" pattern="" precision="0" sourceType="UUID" type="id_Object" usefulColumn="true"/> + <column comment="" key="false" length="8" name="history_datetime" nullable="false" pattern=""yyyy-MM-dd HH:mm:ss.SSSSSS"" precision="6" sourceType="TIMESTAMPTZ" type="id_Date" usefulColumn="true"/> + <column comment="" key="false" length="16" name="vm_id" nullable="false" pattern="" precision="0" sourceType="UUID" type="id_Object" usefulColumn="true"/> <column comment="" key="false" length="2147483647" name="disks_usage" nullable="true" pattern="" precision="0" sourceType="TEXT" type="id_String" usefulColumn="true"/> </metadata> </node> @@ -2347,18 +2347,18 @@ <elementParameter field="CHECK" name="INFORMATION" value="false"/> <elementParameter field="MEMO" name="COMMENT" value=""/> <elementParameter field="CHECK" name="VALIDATION_RULES" value="false"/> - <metadata connector="FLOW" label="vm_disks_usage_daily_history" name="disks_usage_daily"> - <column comment="" key="false" length="35" name="history_datetime" nullable="false" pattern=""dd-MM-yyyy"" precision="6" sourceType="TIMESTAMPTZ" type="id_Date" usefulColumn="true"/> - <column comment="" key="false" length="2147483647" name="vm_id" nullable="false" pattern="" precision="0" sourceType="UUID" type="id_Object" usefulColumn="true"/> + <metadata connector="FLOW" label="vm_daily_history" name="disks_usage_aggregate"> + <column comment="" key="false" length="8" name="history_datetime" nullable="false" pattern=""yyyy-MM-dd HH:mm:ss.SSSSSS"" precision="6" sourceType="TIMESTAMPTZ" type="id_Date" usefulColumn="true"/> + <column comment="" key="false" length="16" name="vm_id" nullable="false" pattern="" precision="0" sourceType="UUID" type="id_Object" usefulColumn="true"/> <column comment="" key="false" length="2147483647" name="disks_usage" nullable="true" pattern="" precision="0" sourceType="TEXT" type="id_String" usefulColumn="true"/> </metadata> <nodeData xsi:type="MapperData"> - <uiProperties/> + <uiProperties shellMaximized="true"/> <varTables sizeState="INTERMEDIATE" name="Var" minimized="true"/> - <outputTables sizeState="INTERMEDIATE" name="disks_usage_daily"> - <mapperTableEntries name="history_datetime" expression="row12.history_datetime" type="id_Date"/> - <mapperTableEntries name="vm_id" expression="row12.vm_id" type="id_Object"/> - <mapperTableEntries name="disks_usage" expression="row12.disks_usage" type="id_String" nullable="true"/> + <outputTables sizeState="INTERMEDIATE" name="disks_usage_aggregate"> + <mapperTableEntries name="history_datetime" expression="RoutineHistoryETL.startOfDay(row12.history_datetime)" type="id_Date"/> + <mapperTableEntries name="vm_id" expression="row12.vm_id " type="id_Object"/> + <mapperTableEntries name="disks_usage" expression="row12.disks_usage " type="id_String" nullable="true"/> </outputTables> <inputTables sizeState="INTERMEDIATE" name="row12" matchingMode="UNIQUE_MATCH" lookupMode="LOAD_ONCE"> <mapperTableEntries name="history_datetime" type="id_Date"/> @@ -2367,7 +2367,35 @@ </inputTables> </nodeData> </node> - <node componentName="tJDBCOutput" componentVersion="0.102" offsetLabelX="0" offsetLabelY="0" posX="1056" posY="448"> + <node componentName="tAggregateRow" componentVersion="0.102" offsetLabelX="0" offsetLabelY="0" posX="1056" posY="416"> + <elementParameter field="TEXT" name="UNIQUE_NAME" value="tAggregateRow_9"/> + <elementParameter field="TABLE" name="GROUPBYS"> + <elementValue elementRef="OUTPUT_COLUMN" value="history_datetime"/> + <elementValue elementRef="INPUT_COLUMN" value="history_datetime"/> + <elementValue elementRef="OUTPUT_COLUMN" value="vm_id"/> + <elementValue elementRef="INPUT_COLUMN" value="vm_id"/> + </elementParameter> + <elementParameter field="TABLE" name="OPERATIONS"> + <elementValue elementRef="OUTPUT_COLUMN" value="disks_usage"/> + <elementValue elementRef="FUNCTION" value="last"/> + <elementValue elementRef="INPUT_COLUMN" value="disks_usage"/> + <elementValue elementRef="IGNORE_NULL" value="true"/> + </elementParameter> + <elementParameter field="TEXT" name="LIST_DELIMITER" value="",""/> + <elementParameter field="CHECK" name="USE_FINANCIAL_PRECISION" value="true"/> + <elementParameter field="CHECK" name="CHECK_TYPE_OVERFLOW" value="false"/> + <elementParameter field="CHECK" name="CHECK_ULP" value="false"/> + <elementParameter field="TEXT" name="CONNECTION_FORMAT" value="row"/> + <elementParameter field="CHECK" name="INFORMATION" value="false"/> + <elementParameter field="MEMO" name="COMMENT" value=""/> + <elementParameter field="CHECK" name="VALIDATION_RULES" value="false"/> + <metadata connector="FLOW" label="vm_daily_history" name="tAggregateRow_9"> + <column comment="" key="false" length="8" name="history_datetime" nullable="false" pattern=""yyyy-MM-dd HH:mm:ss.SSSSSS"" precision="6" sourceType="TIMESTAMPTZ" type="id_Date" usefulColumn="true"/> + <column comment="" key="false" length="16" name="vm_id" nullable="false" pattern="" precision="0" sourceType="UUID" type="id_Object" usefulColumn="true"/> + <column comment="" key="false" length="2147483647" name="disks_usage" nullable="true" pattern="" precision="0" sourceType="TEXT" type="id_String" usefulColumn="true"/> + </metadata> + </node> + <node componentName="tJDBCOutput" componentVersion="0.102" offsetLabelX="0" offsetLabelY="0" posX="1056" posY="512"> <elementParameter field="TEXT" name="UNIQUE_NAME" value="tJDBCOutput_9"/> <elementParameter field="CHECK" name="END_OF_FLOW" value="true"/> <elementParameter field="CHECK" name="USE_EXISTING_CONNECTION" value="true"/> @@ -2414,13 +2442,13 @@ <elementParameter field="MEMO" name="COMMENT" value=""/> <elementParameter field="CHECK" name="VALIDATION_RULES" value="false"/> <metadata connector="FLOW" label="vm_disks_usage_daily_history" name="tJDBCOutput_9"> - <column comment="" key="false" length="35" name="history_datetime" nullable="false" pattern=""dd-MM-yyyy"" precision="6" sourceType="TIMESTAMPTZ" type="id_Date" usefulColumn="true"/> - <column comment="" key="false" length="2147483647" name="vm_id" nullable="false" pattern="" precision="0" sourceType="UUID" type="id_Object" usefulColumn="true"/> + <column comment="" key="false" length="8" name="history_datetime" nullable="false" pattern=""yyyy-MM-dd HH:mm:ss.SSSSSS"" precision="6" sourceType="TIMESTAMPTZ" type="id_Date" usefulColumn="true"/> + <column comment="" key="false" length="16" name="vm_id" nullable="false" pattern="" precision="0" sourceType="UUID" type="id_Object" usefulColumn="true"/> <column comment="" key="false" length="2147483647" name="disks_usage" nullable="true" pattern="" precision="0" sourceType="TEXT" type="id_String" usefulColumn="true"/> </metadata> <metadata connector="REJECT" label="vm_disks_usage_daily_history" name="REJECT"> - <column comment="" key="false" length="35" name="history_datetime" nullable="false" pattern=""dd-MM-yyyy"" precision="6" sourceType="TIMESTAMPTZ" type="id_Date" usefulColumn="true"/> - <column comment="" key="false" length="2147483647" name="vm_id" nullable="false" pattern="" precision="0" sourceType="UUID" type="id_Object" usefulColumn="true"/> + <column comment="" key="false" length="8" name="history_datetime" nullable="false" pattern=""yyyy-MM-dd HH:mm:ss.SSSSSS"" precision="6" sourceType="TIMESTAMPTZ" type="id_Date" usefulColumn="true"/> + <column comment="" key="false" length="16" name="vm_id" nullable="false" pattern="" precision="0" sourceType="UUID" type="id_Object" usefulColumn="true"/> <column comment="" key="false" length="2147483647" name="disks_usage" nullable="true" pattern="" precision="0" sourceType="TEXT" type="id_String" usefulColumn="true"/> <column defaultValue="" key="false" length="255" name="errorCode" nullable="true" precision="0" sourceType="" type="id_String" usefulColumn="true"/> <column defaultValue="" key="false" length="255" name="errorMessage" nullable="true" precision="0" sourceType="" type="id_String" usefulColumn="true"/> @@ -4274,7 +4302,74 @@ <elementParameter field="CHECK" name="ACTIVATE" value="true"/> <elementParameter field="TEXT" name="UNIQUE_NAME" value="row12"/> </connection> - <connection connectorName="FLOW" label="disks_usage_daily" lineStyle="0" metaname="disks_usage_daily" offsetLabelX="0" offsetLabelY="0" source="tMap_9" target="tJDBCOutput_9"> + <connection connectorName="FLOW" label="disks_usage_aggregate" lineStyle="0" metaname="disks_usage_aggregate" offsetLabelX="0" offsetLabelY="0" source="tMap_9" target="tAggregateRow_9"> + <elementParameter field="CHECK" name="TRACES_CONNECTION_ENABLE" value="true"/> + <elementParameter field="TABLE" name="TRACES_CONNECTION_FILTER"> + <elementValue elementRef="TRACE_COLUMN" value="history_datetime"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + <elementValue elementRef="TRACE_COLUMN" value="vm_id"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + <elementValue elementRef="TRACE_COLUMN" value="vm_status"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + <elementValue elementRef="TRACE_COLUMN" value="minutes_in_status"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + <elementValue elementRef="TRACE_COLUMN" value="cpu_usage_percent"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + <elementValue elementRef="TRACE_COLUMN" value="max_cpu_usage"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + <elementValue elementRef="TRACE_COLUMN" value="memory_usage_percent"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + <elementValue elementRef="TRACE_COLUMN" value="max_memory_usage"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + <elementValue elementRef="TRACE_COLUMN" value="user_cpu_usage_percent"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + <elementValue elementRef="TRACE_COLUMN" value="max_user_cpu_usage_percent"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + <elementValue elementRef="TRACE_COLUMN" value="system_cpu_usage_percent"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + <elementValue elementRef="TRACE_COLUMN" value="max_system_cpu_usage_percent"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + <elementValue elementRef="TRACE_COLUMN" value="vm_ip"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + <elementValue elementRef="TRACE_COLUMN" value="current_user_id"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + <elementValue elementRef="TRACE_COLUMN" value="currently_running_on_host"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + <elementValue elementRef="TRACE_COLUMN" value="vm_configuration_version"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + <elementValue elementRef="TRACE_COLUMN" value="current_host_configuration_version"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + <elementValue elementRef="TRACE_COLUMN" value="disks_usage"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + </elementParameter> + <elementParameter field="CHECK" name="MONITOR_CONNECTION" value="false"/> + <elementParameter field="CHECK" name="USEROWLABEL" value="true"/> + <elementParameter field="TEXT" name="METTERLABEL" value=""MyLabel""/> + <elementParameter field="CLOSED_LIST" name="ABSOLUTE" value="Absolute"/> + <elementParameter field="CONNECTION_LIST" name="CONNECTIONS" value=""/> + <elementParameter field="TABLE" name="THRESHLODS"/> + <elementParameter field="CHECK" name="ACTIVATE" value="true"/> + <elementParameter field="TEXT" name="UNIQUE_NAME" value="disks_usage_aggregate"/> + </connection> + <connection connectorName="FLOW" label="row15" lineStyle="0" metaname="tAggregateRow_9" offsetLabelX="0" offsetLabelY="0" source="tAggregateRow_9" target="tJDBCOutput_9"> <elementParameter field="CHECK" name="TRACES_CONNECTION_ENABLE" value="true"/> <elementParameter field="TABLE" name="TRACES_CONNECTION_FILTER"> <elementValue elementRef="TRACE_COLUMN" value="history_datetime"/> @@ -4294,7 +4389,7 @@ <elementParameter field="CONNECTION_LIST" name="CONNECTIONS" value=""/> <elementParameter field="TABLE" name="THRESHLODS"/> <elementParameter field="CHECK" name="ACTIVATE" value="true"/> - <elementParameter field="TEXT" name="UNIQUE_NAME" value="disks_usage_daily"/> + <elementParameter field="TEXT" name="UNIQUE_NAME" value="row15"/> </connection> <connection connectorName="FLOW" label="row13" lineStyle="0" metaname="tJDBCInput_10" offsetLabelX="0" offsetLabelY="0" source="tJDBCInput_10" target="tMap_10"> <elementParameter field="CHECK" name="TRACES_CONNECTION_ENABLE" value="true"/> diff --git a/tos_project/process/AggregationToDaily_3.5.properties b/tos_project/process/AggregationToDaily_3.5.properties index 0cddf73..e0f13cd 100644 --- a/tos_project/process/AggregationToDaily_3.5.properties +++ b/tos_project/process/AggregationToDaily_3.5.properties @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:TalendProperties="http://www.talend.org/properties"> - <TalendProperties:Property xmi:id="_6qukwEi2EeCv8PaoeAjHHg" id="_s0iQoFShEeCW44CWrpjEnA" label="AggregationToDaily" creationDate="2011-07-06T14:17:29.833+0300" modificationDate="2014-08-10T14:56:45.483+0300" version="3.5" statusCode="" item="_6qukwki2EeCv8PaoeAjHHg" displayName="AggregationToDaily"> + <TalendProperties:Property xmi:id="_6qukwEi2EeCv8PaoeAjHHg" id="_s0iQoFShEeCW44CWrpjEnA" label="AggregationToDaily" creationDate="2011-07-06T14:17:29.833+0300" modificationDate="2015-03-16T11:41:05.713+0200" version="3.5" statusCode="" item="_6qukwki2EeCv8PaoeAjHHg" displayName="AggregationToDaily"> <author href="../talend.project#_SapC4EJlEeCWRqOtaF5m-w"/> </TalendProperties:Property> <TalendProperties:ItemState xmi:id="_s1bogFShEeCW44CWrpjEnA" path=""/> diff --git a/tos_project/process/AggregationToHourly_3.5.item b/tos_project/process/AggregationToHourly_3.5.item index 53907f6..0da9d06 100644 --- a/tos_project/process/AggregationToHourly_3.5.item +++ b/tos_project/process/AggregationToHourly_3.5.item @@ -2310,7 +2310,7 @@ <elementParameter field="TECHNICAL" name="QUERYSTORE:REPOSITORY_QUERYSTORE_TYPE" value=""/> <elementParameter field="TECHNICAL" name="QUERYSTORE:QUERYSTORE_TYPE" value="BUILT_IN"/> <elementParameter field="GUESS_SCHEMA" name="GUESS_SCHEMA" value=""""/> - <elementParameter field="MEMO_SQL" name="QUERY" value=""SELECT date_trunc('hour', history_datetime), vm_id, disks_usage
FROM vm_disks_usage_samples_history
WHERE history_id in (SELECT max(history_id)
 FROM vm_disks_usage_samples_history
 GROUP BY vm_id, date_trunc('hour', history_datetime)) 
AND history_datetime >= '"+context.lastHourAggr+"'
AND history_datetime < '"+TalendDate.addDate(context.lastHourAggr, 1,"HH")+"'
""/> + <elementParameter field="MEMO_SQL" name="QUERY" value=""SELECT
 history_datetime,
 vm_id,
 disks_usage
FROM vm_disks_usage_samples_history
WHERE history_datetime >= '"+context.lastHourAggr+"'
AND history_datetime < '"+TalendDate.addDate(context.lastHourAggr, 1,"HH")+"'
ORDER BY history_datetime,
 vm_id""/> <elementParameter field="LABEL" name="NOTE" value="This option only applies when deploying and running in the Talend Runtime"/> <elementParameter field="CHECK" name="SPECIFY_DATASOURCE_ALIAS" value="false"/> <elementParameter field="TEXT" name="DATASOURCE_ALIAS" value=""""/> @@ -2351,18 +2351,18 @@ <elementParameter field="CHECK" name="INFORMATION" value="false"/> <elementParameter field="MEMO" name="COMMENT" value=""/> <elementParameter field="CHECK" name="VALIDATION_RULES" value="false"/> - <metadata connector="FLOW" label="vm_disks_usage_daily_history" name="disks_usage_hourly"> - <column comment="" key="false" length="35" name="history_datetime" nullable="false" pattern=""dd-MM-yyyy"" precision="6" sourceType="TIMESTAMPTZ" type="id_Date" usefulColumn="true"/> - <column comment="" key="false" length="2147483647" name="vm_id" nullable="false" pattern="" precision="0" sourceType="UUID" type="id_Object" usefulColumn="true"/> - <column comment="" key="false" length="2147483647" name="disks_usage" nullable="true" pattern="" precision="0" sourceType="TEXT" type="id_String" usefulColumn="true"/> + <metadata connector="FLOW" label="vm_hourly_history" name="disks_usage_aggregate"> + <column comment="" key="false" length="8" name="history_datetime" nullable="false" pattern=""yyyy-MM-dd HH:mm:ss.SSSSSS"" precision="6" sourceType="TIMESTAMP" type="id_Date" usefulColumn="true"/> + <column comment="" key="false" length="16" name="vm_id" nullable="false" pattern="" precision="0" sourceType="POINT" type="id_Object" usefulColumn="true"/> + <column comment="" key="false" length="2147483647" name="disks_usage" nullable="true" pattern="" sourceType="" type="id_String" originalLength="2147483647" usefulColumn="true"/> </metadata> <nodeData xsi:type="MapperData"> - <uiProperties/> + <uiProperties shellMaximized="true"/> <varTables sizeState="INTERMEDIATE" name="Var" minimized="true"/> - <outputTables sizeState="INTERMEDIATE" name="disks_usage_hourly"> - <mapperTableEntries name="history_datetime" expression="row12.history_datetime" type="id_Date"/> - <mapperTableEntries name="vm_id" expression="row12.vm_id" type="id_Object"/> - <mapperTableEntries name="disks_usage" expression="row12.disks_usage" type="id_String" nullable="true"/> + <outputTables sizeState="INTERMEDIATE" name="disks_usage_aggregate"> + <mapperTableEntries name="history_datetime" expression="RoutineHistoryETL.startOfHour(row12.history_datetime) " type="id_Date"/> + <mapperTableEntries name="vm_id" expression="row12.vm_id " type="id_Object"/> + <mapperTableEntries name="disks_usage" expression="row12.disks_usage " type="id_String" nullable="true"/> </outputTables> <inputTables sizeState="INTERMEDIATE" name="row12" matchingMode="UNIQUE_MATCH" lookupMode="LOAD_ONCE"> <mapperTableEntries name="history_datetime" type="id_Date"/> @@ -2371,7 +2371,35 @@ </inputTables> </nodeData> </node> - <node componentName="tJDBCOutput" componentVersion="0.102" offsetLabelX="0" offsetLabelY="0" posX="1056" posY="384"> + <node componentName="tAggregateRow" componentVersion="0.102" offsetLabelX="0" offsetLabelY="0" posX="1056" posY="384"> + <elementParameter field="TEXT" name="UNIQUE_NAME" value="tAggregateRow_9"/> + <elementParameter field="TABLE" name="GROUPBYS"> + <elementValue elementRef="OUTPUT_COLUMN" value="history_datetime"/> + <elementValue elementRef="INPUT_COLUMN" value="history_datetime"/> + <elementValue elementRef="OUTPUT_COLUMN" value="vm_id"/> + <elementValue elementRef="INPUT_COLUMN" value="vm_id"/> + </elementParameter> + <elementParameter field="TABLE" name="OPERATIONS"> + <elementValue elementRef="OUTPUT_COLUMN" value="disks_usage"/> + <elementValue elementRef="FUNCTION" value="last"/> + <elementValue elementRef="INPUT_COLUMN" value="disks_usage"/> + <elementValue elementRef="IGNORE_NULL" value="true"/> + </elementParameter> + <elementParameter field="TEXT" name="LIST_DELIMITER" value="",""/> + <elementParameter field="CHECK" name="USE_FINANCIAL_PRECISION" value="true"/> + <elementParameter field="CHECK" name="CHECK_TYPE_OVERFLOW" value="false"/> + <elementParameter field="CHECK" name="CHECK_ULP" value="false"/> + <elementParameter field="TEXT" name="CONNECTION_FORMAT" value="row"/> + <elementParameter field="CHECK" name="INFORMATION" value="false"/> + <elementParameter field="MEMO" name="COMMENT" value=""/> + <elementParameter field="CHECK" name="VALIDATION_RULES" value="false"/> + <metadata connector="FLOW" label="vm_hourly_history" name="tAggregateRow_9"> + <column comment="" key="false" length="8" name="history_datetime" nullable="false" pattern=""yyyy-MM-dd HH:mm:ss.SSSSSS"" precision="6" sourceType="TIMESTAMP" type="id_Date" usefulColumn="true"/> + <column comment="" key="false" length="16" name="vm_id" nullable="false" pattern="" precision="0" sourceType="POINT" type="id_Object" usefulColumn="true"/> + <column comment="" key="false" length="2147483647" name="disks_usage" nullable="true" pattern="" sourceType="" type="id_String" originalLength="2147483647" usefulColumn="true"/> + </metadata> + </node> + <node componentName="tJDBCOutput" componentVersion="0.102" offsetLabelX="0" offsetLabelY="0" posX="1056" posY="480"> <elementParameter field="TEXT" name="UNIQUE_NAME" value="tJDBCOutput_9"/> <elementParameter field="CHECK" name="END_OF_FLOW" value="true"/> <elementParameter field="CHECK" name="USE_EXISTING_CONNECTION" value="true"/> @@ -2417,15 +2445,15 @@ <elementParameter field="CHECK" name="INFORMATION" value="false"/> <elementParameter field="MEMO" name="COMMENT" value=""/> <elementParameter field="CHECK" name="VALIDATION_RULES" value="false"/> - <metadata connector="FLOW" label="vm_disks_usage_daily_history" name="tJDBCOutput_9"> - <column comment="" key="false" length="35" name="history_datetime" nullable="false" pattern=""dd-MM-yyyy"" precision="6" sourceType="TIMESTAMPTZ" type="id_Date" usefulColumn="true"/> - <column comment="" key="false" length="2147483647" name="vm_id" nullable="false" pattern="" precision="0" sourceType="UUID" type="id_Object" usefulColumn="true"/> - <column comment="" key="false" length="2147483647" name="disks_usage" nullable="true" pattern="" precision="0" sourceType="TEXT" type="id_String" usefulColumn="true"/> + <metadata connector="FLOW" label="vm_hourly_history" name="tJDBCOutput_9"> + <column comment="" key="false" length="8" name="history_datetime" nullable="false" pattern=""yyyy-MM-dd HH:mm:ss.SSSSSS"" precision="6" sourceType="TIMESTAMP" type="id_Date" usefulColumn="true"/> + <column comment="" key="false" length="16" name="vm_id" nullable="false" pattern="" precision="0" sourceType="POINT" type="id_Object" usefulColumn="true"/> + <column comment="" key="false" length="2147483647" name="disks_usage" nullable="true" pattern="" sourceType="" type="id_String" originalLength="2147483647" usefulColumn="true"/> </metadata> - <metadata connector="REJECT" label="vm_disks_usage_daily_history" name="REJECT"> - <column comment="" key="false" length="35" name="history_datetime" nullable="false" pattern=""dd-MM-yyyy"" precision="6" sourceType="TIMESTAMPTZ" type="id_Date" usefulColumn="true"/> - <column comment="" key="false" length="2147483647" name="vm_id" nullable="false" pattern="" precision="0" sourceType="UUID" type="id_Object" usefulColumn="true"/> - <column comment="" key="false" length="2147483647" name="disks_usage" nullable="true" pattern="" precision="0" sourceType="TEXT" type="id_String" usefulColumn="true"/> + <metadata connector="REJECT" label="vm_hourly_history" name="REJECT"> + <column comment="" key="false" length="8" name="history_datetime" nullable="false" pattern=""yyyy-MM-dd HH:mm:ss.SSSSSS"" precision="6" sourceType="TIMESTAMP" type="id_Date" usefulColumn="true"/> + <column comment="" key="false" length="16" name="vm_id" nullable="false" pattern="" precision="0" sourceType="POINT" type="id_Object" usefulColumn="true"/> + <column comment="" key="false" length="2147483647" name="disks_usage" nullable="true" pattern="" sourceType="" type="id_String" originalLength="2147483647" usefulColumn="true"/> <column defaultValue="" key="false" length="255" name="errorCode" nullable="true" precision="0" sourceType="" type="id_String" usefulColumn="true"/> <column defaultValue="" key="false" length="255" name="errorMessage" nullable="true" precision="0" sourceType="" type="id_String" usefulColumn="true"/> </metadata> @@ -4349,7 +4377,7 @@ <elementParameter field="CHECK" name="ACTIVATE" value="true"/> <elementParameter field="TEXT" name="UNIQUE_NAME" value="row12"/> </connection> - <connection connectorName="FLOW" label="disks_usage_hourly" lineStyle="0" metaname="disks_usage_hourly" offsetLabelX="0" offsetLabelY="0" source="tMap_9" target="tJDBCOutput_9"> + <connection connectorName="FLOW" label="disks_usage_aggregate" lineStyle="0" metaname="disks_usage_aggregate" offsetLabelX="0" offsetLabelY="0" source="tMap_9" target="tAggregateRow_9"> <elementParameter field="CHECK" name="TRACES_CONNECTION_ENABLE" value="true"/> <elementParameter field="TABLE" name="TRACES_CONNECTION_FILTER"> <elementValue elementRef="TRACE_COLUMN" value="history_datetime"/> @@ -4369,7 +4397,29 @@ <elementParameter field="CONNECTION_LIST" name="CONNECTIONS" value=""/> <elementParameter field="TABLE" name="THRESHLODS"/> <elementParameter field="CHECK" name="ACTIVATE" value="true"/> - <elementParameter field="TEXT" name="UNIQUE_NAME" value="disks_usage_hourly"/> + <elementParameter field="TEXT" name="UNIQUE_NAME" value="disks_usage_aggregate"/> + </connection> + <connection connectorName="FLOW" label="row15" lineStyle="0" metaname="tAggregateRow_9" offsetLabelX="0" offsetLabelY="0" source="tAggregateRow_9" target="tJDBCOutput_9"> + <elementParameter field="CHECK" name="TRACES_CONNECTION_ENABLE" value="true"/> + <elementParameter field="TABLE" name="TRACES_CONNECTION_FILTER"> + <elementValue elementRef="TRACE_COLUMN" value="history_datetime"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + <elementValue elementRef="TRACE_COLUMN" value="vm_id"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + <elementValue elementRef="TRACE_COLUMN" value="disks_usage"/> + <elementValue elementRef="TRACE_COLUMN_CHECKED" value="true"/> + <elementValue elementRef="TRACE_COLUMN_CONDITION" value=""/> + </elementParameter> + <elementParameter field="CHECK" name="MONITOR_CONNECTION" value="false"/> + <elementParameter field="CHECK" name="USEROWLABEL" value="true"/> + <elementParameter field="TEXT" name="METTERLABEL" value=""MyLabel""/> + <elementParameter field="CLOSED_LIST" name="ABSOLUTE" value="Absolute"/> + <elementParameter field="CONNECTION_LIST" name="CONNECTIONS" value=""/> + <elementParameter field="TABLE" name="THRESHLODS"/> + <elementParameter field="CHECK" name="ACTIVATE" value="true"/> + <elementParameter field="TEXT" name="UNIQUE_NAME" value="row15"/> </connection> <connection connectorName="FLOW" label="row13" lineStyle="0" metaname="tJDBCInput_10" offsetLabelX="0" offsetLabelY="0" source="tJDBCInput_10" target="tMap_10"> <elementParameter field="CHECK" name="TRACES_CONNECTION_ENABLE" value="true"/> diff --git a/tos_project/process/AggregationToHourly_3.5.properties b/tos_project/process/AggregationToHourly_3.5.properties index 62fd941..78f2f3b 100644 --- a/tos_project/process/AggregationToHourly_3.5.properties +++ b/tos_project/process/AggregationToHourly_3.5.properties @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:TalendProperties="http://www.talend.org/properties"> - <TalendProperties:Property xmi:id="_6qukwEi2EeCv8PaoeAjHHg" id="_6qsvkEi2EeCv8PaoeAjHHg" label="AggregationToHourly" creationDate="2011-07-06T14:17:18.376+0300" modificationDate="2014-08-10T14:55:29.268+0300" version="3.5" statusCode="" item="_6qukwki2EeCv8PaoeAjHHg" displayName="AggregationToHourly"> + <TalendProperties:Property xmi:id="_6qukwEi2EeCv8PaoeAjHHg" id="_6qsvkEi2EeCv8PaoeAjHHg" label="AggregationToHourly" creationDate="2011-07-06T14:17:18.376+0300" modificationDate="2015-03-16T11:07:19.017+0200" version="3.5" statusCode="" item="_6qukwki2EeCv8PaoeAjHHg" displayName="AggregationToHourly"> <author href="../talend.project#_SapC4EJlEeCWRqOtaF5m-w"/> </TalendProperties:Property> <TalendProperties:ItemState xmi:id="_6qukwUi2EeCv8PaoeAjHHg" path=""/> -- To view, visit https://gerrit.ovirt.org/38812 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iacff81b722d27d19f6ff304756255c5435045fe6 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-dwh Gerrit-Branch: ovirt-engine-dwh-3.5 Gerrit-Owner: Shirly Radco <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
