您好,登錄后才能下訂單哦!
H2 Console 設置系統變量 set IGNITE_H2_DEBUG_CONSOLE=true, 啟動IGNITE的時候會自動彈出一個h3 console的瀏覽器, 可以看到建立的索引和具體的數據
參考 https://apacheignite.readme.io/docs/sql-performance-and-debugging
客戶端程序可以加 System.setProperty("IGNITE_QUIET", "false");
SqlFieldsQuery query = new SqlFieldsQuery("explain [original query]") 可以看到SQL執行計劃,主要是索引的使用
JMX jconsole 可以看到CACHE的基本信息,JMXBean名字是:org.apache.[cacheId].[gridName].[cacheName] 內存的使用情況: org.apache.[cacheId].MemoryMetrics 需要設置IGNITE_JMX_PORT
遠程DEBUG 修改ignite.bat/ignite.sh 中的 JVM_OPTS: set JVM_OPTS=-Xms1g -Xmx1g -server -XX:+AggressiveOpts -XX:MaxMetaspaceSize=256m -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9527
日志級別調整 IGNITE 支持 log4j, log4j2, slf 等等,需要將[ignite_home]/libs/optional目錄下的ignite-log4j,ignite-log4j2或者ignite-slf4j 復制到libs目錄下, 然后修改spring 配置文件:
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="gridLogger">
<bean class="org.apache.ignite.logger.log4j.Log4JLogger">
<constructor-arg type="java.lang.String" value="log4j.xml"/>
</bean>
<bean class="org.apache.ignite.logger.log4j2.Log4J2Logger">
<constructor-arg type="java.lang.String" value="log4j2.xml"/>
</bean>
</property>
<!-- Other Ignite configurations -->
...
</bean>
默認使用了java.util.log [ignite_home]/config/java.util.logging.properties. 日志記錄在[ignite_home]\work\log\下. 參考:https://apacheignite.readme.io/docs/logging
核心日志:
查詢:
客戶端 IgniteH2Indexing.queryDistributedSqlFields
if (log.isDebugEnabled())
log.debug("Parsed query: `" + sqlQry + "` into two step query: " + twoStepQry);
服務端 GridQueryProcessor.store
if (log.isDebugEnabled())
log.debug("Store [cache=" + cacheName + ", key=" + key + ", val=" + val + "]");
REBALANCE:
服務端 GridDhtPartitionSupplier.handleDemandMessage
if (log.isDebugEnabled())
log.debug("Starting supplying rebalancing [cache=" + grp.cacheOrGroupName() + ", fromNode=" + node.id() + ", partitionsCount=" + d.partitions().size() + ", topology=" + d.topologyVersion() + ", updateSeq=" + d.updateSequence() + ", idx=" + idx + "]");
if (log.isDebugEnabled())
log.debug("Finished supplying rebalancing [cache=" + grp.cacheOrGroupName() + ", fromNode=" + node.id() + ", topology=" + d.topologyVersion() + ", updateSeq=" + d.updateSequence() + ", idx=" + idx + "]");
NETWORK:
org.apache.ignite.internal.util.nio.GridTcpNioCommunicationClient
org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。