<prompt> Unda programu ya Java inayotumia hifadhidata ya Apache Cassandra NoSQL kuhifadhi na kurejesha data ya mfululizo wa saa. Mpango huo unapaswa kujumuisha utendakazi wa kuingiza pointi mpya za data, kuuliza data kulingana na masafa ya muda, na kutekeleza shughuli za msingi za kujumlisha k.m., wastani, dakika, upeo kwenye data iliyorejeshwa.PLINFORMAT  <response>: agiza com.datastax.driver.core.Cluster;agiza com.datastax.driver.core.ResultSet;agiza com.datastax.driver.core.Row;agiza com.datastax.driver.core.Session;agiza java.util.Tarehe;agiza java.util.UUID;darasa la umma la TimeSeriesData kikao cha Kikao cha tuli cha faragha; utupu tuli wa umma String args Unganisha kwa Cassandra Kundi la Nguzo Cluster.builder.addContactPoint127.0.0.1.build; kikao cluster.connecttimeseries; UUID sensorId UUID.randomUUID; Weka pointi za data insertDataPointsensorId, new Date, 25.5; insertDataPointsensorId, new DateSystem.currentTimeMillis - 3600000, 24.3; Hoja za data za hoja ResultSet resultSet queryDataPointssensorId, new DateSystem.currentTimeMillis - 7200000, new Date; kwa Safu mlalo : resultSet System.out.printlnrow.getUUIDsensor_id row.getTimestampmuhuri wa muda row.getDoublethamani; Fanya shughuli za kujumlisha wastani mara mbili getAveragesensorId; dakika mbili getMinsensorId; max mara mbili getMaxsensorId; System.out.printlnWastani: wastani; System.out.printlnMin: min; System.out.printlnUpeo: max; Funga muunganisho cluster.close; utupu tuli wa umma kuingizaDataPointUUID sensorId, Muhuri wa saa wa Tarehe, thamani mbili Hoja ya mfuatano String.formatWEKA NDANI ya vituo vya data kitambulisho_cha_kitambulisho, muhuri wa muda, thamani VALUES s, s, f;, sensorId.toString, timestamp.toInstant.toString, thamani; session.executeswali; public static ResultSet queryDataPointsUUID sensorId, Date startTime, Tarehe endTime Hoja ya kamba String.formatCHAGUA KUTOKA vituo vya data WAPI sensor_id s NA muhuri wa muda s NA muhuri wa muda s;, sensorId.toString, startTime.toInstant.toString , endTime.toInstant.toString; kurudi kikao.executeswali; umma tuli getAverage mbiliUUID sensorId Hoja ya kamba String.formatCHAGUA AVGthamani kama wastani KUTOKA vituo vya data WHERE sensor_id s;, sensorId.toString; Safu mlalo session.executequery.moja; return row.getDoublewastani; getMin tuli ya umma UUID sensorId Hoja ya kamba String.formatCHAGUA MINthamani kama min_value KUTOKA vituo vya data WHERE sensor_id s;, sensorId.toString; Safu mlalo session.executequery.moja; return row.getDoublemin_value; getMax tuli ya umma UUID sensorId Hoja ya mfuatano String.formatCHAGUA MAXthamani kama max_value KUTOKA vituo vya data WHERE sensor_id s;, sensorId.toString; Safu mlalo session.executequery.moja; return row.getDoublemax_value; 