This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns rhq.plugin | |
| (:require [rhq.config :as config]) | |
| (:import [org.rhq.core.pluginapi.inventory | |
| ResourceDiscoveryComponent ResourceDiscoveryContext ClassLoaderFacet | |
| DiscoveredResourceDetails ResourceComponent ResourceContext] | |
| [org.rhq.core.domain.measurement AvailabilityType]) | |
| (:gen-class | |
| :name rhq.plugin.PluginComponent | |
| :implements [org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent | |
| org.rhq.core.pluginapi.inventory.ResourceComponent])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (config [["my-map" {"username" "rhqadmin" | |
| "password" "rhqadmin"}] | |
| ["hostname" "localhost"]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SliceQuery<String,Composite, Integer> sliceQuery = HFactory.createSliceQuery(keyspace, StringSerializer.get(), | |
| new CompositeSerializer().get(), IntegerSerializer.get()); | |
| sliceQuery.setColumnFamily("metrics_work_queue"); | |
| sliceQuery.setKey("raw_metrics"); | |
| ColumnSliceIterator<String, Composite, Integer> iterator = new ColumnSliceIterator<String, Composite, Integer>( | |
| sliceQuery, (Composite) null, (Composite) null, false); | |
| assertTrue(iterator.hasNext()); | |
| HColumn<Composite, Integer> actualQueueValue = iterator.next(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private DateTime get6HourTimeSlice(DateTime dateTime) { | |
| Chronology chronology = GregorianChronology.getInstance(); | |
| DateTimeField hourField = chronology.hourOfDay(); | |
| DividedDateTimeField dividedField = new DividedDateTimeField(hourField, DateTimeFieldType.clockhourOfDay(), 6); | |
| long timestamp = dividedField.roundFloor(dateTime.getMillis()); | |
| return new DateTime(timestamp); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Failed tests: testSendSecureMessageClientAuthWantWithTruststore(org.rhq.enterprise.agent.AgentComm2Test): Failed to send command from agent1 to agent2: Command Response: isSuccessful=[false]; command=[null]; results=[null]; exception=[org.jboss.remoting.CannotConnectException:Can not get connection to server. Problem establishing socket connection for InvokerLocator [sslsocket://127.0.0.1:22222/] -> java.lang.reflect.InvocationTargetException:null -> javax.net.ssl.SSLHandshakeException:sun.security.validator.ValidatorException: No trusted certificate found -> sun.security.validator.ValidatorException:No trusted certificate found] | |
| testSendSecureMessageFullAuth(org.rhq.enterprise.agent.AgentComm2Test): Failed to send command from agent1 to agent2: Command Response: isSuccessful=[false]; command=[null]; results=[null]; exception=[org.jboss.remoting.CannotConnectException:Can not get connection to server. Problem establishing socket connection for InvokerLocator [sslsocket://127.0.0.1:22222/] -> java.lang.ref |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MeasurementDataTrait extends MeasurementData { | |
| @Column(length = 255) | |
| private String value; | |
| // rest omitted for brevity | |
| } | |
| @Entity |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns rhq.plugin | |
| (:require [rhq.config :as config]) | |
| (:import [org.rhq.core.pluginapi.inventory | |
| ResourceDiscoveryComponent ResourceDiscoveryContext ClassLoaderFacet | |
| DiscoveredResourceDetails ResourceComponent ResourceContext] | |
| [org.rhq.core.domain.measurement AvailabilityType]) | |
| (:gen-class | |
| :name rhq.plugin.PluginComponent | |
| :implements [org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent | |
| org.rhq.core.pluginapi.inventory.ResourceComponent])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MeasurementDataTrait extends MeasurementData { | |
| @Column(length = 255) | |
| private String value; | |
| // rest omitted for brevity | |
| } | |
| @Entity |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SliceQuery<Integer, Double Long> query = HFactory.createSliceQuery(keyspace, IntegerSerializer.get(), | |
| LongSerializer.get(), DoubleSerializer.get()); | |
| query.setColumnFamily(rawMetricsDataCF); | |
| query.setKey(scheduleId); | |
| ColumnSliceIterator<Integer, Double, Long> iterator = new ColumnSliceIterator<Integer, Double, Long>( | |
| query, startTime.getMillis(), endTime.getMillis(), false); | |
| HColumn<Long, Double> column = iterator.next(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ColumnSliceIterator<Integer, Double, Long> iterator = new ColumnSliceIterator<Integer, Double, Long>( | |
| query, startTime.getMillis(), endTime.getMillis(), false); | |
| iterator.hasNext(); // call hasNext first to initialize internal iterator | |
| HColumn<Long, Double> column = iterator.next(); |
OlderNewer