rjack-solr 3.6.0.0-java
Sign up to get free protection for your applications and to get access to all the features.
- data/History.rdoc +2 -0
- data/Manifest.txt +62 -0
- data/NOTICE.txt +7 -0
- data/README.rdoc +71 -0
- data/Rakefile +12 -0
- data/assembly.xml +20 -0
- data/bin/rjack-solr-fg +53 -0
- data/config/config.rb +9 -0
- data/init/rjack-solr +44 -0
- data/lib/rjack-solr.rb +30 -0
- data/lib/rjack-solr/base.rb +28 -0
- data/lib/rjack-solr/commons-fileupload-1.2.1.jar +0 -0
- data/lib/rjack-solr/commons-io-2.1.jar +0 -0
- data/lib/rjack-solr/commons-lang-2.6.jar +0 -0
- data/lib/rjack-solr/config.rb +24 -0
- data/lib/rjack-solr/server.rb +70 -0
- data/lib/rjack-solr/solr-core-3.6.0.jar +0 -0
- data/lib/rjack-solr/solr-solrj-3.6.0.jar +0 -0
- data/pom.xml +96 -0
- data/test/test_solr.rb +43 -0
- data/webapp/META-INF/LICENSE.txt +1166 -0
- data/webapp/META-INF/MANIFEST.MF +13 -0
- data/webapp/META-INF/NOTICE.txt +438 -0
- data/webapp/WEB-INF/web.xml +153 -0
- data/webapp/WEB-INF/weblogic.xml +12 -0
- data/webapp/admin/_info.jsp +120 -0
- data/webapp/admin/action.jsp +94 -0
- data/webapp/admin/analysis.jsp +496 -0
- data/webapp/admin/analysis.xsl +179 -0
- data/webapp/admin/dataimport.jsp +53 -0
- data/webapp/admin/debug.jsp +103 -0
- data/webapp/admin/distributiondump.jsp +160 -0
- data/webapp/admin/favicon.ico +0 -0
- data/webapp/admin/form.jsp +152 -0
- data/webapp/admin/get-file.jsp +72 -0
- data/webapp/admin/get-properties.jsp +24 -0
- data/webapp/admin/header.jsp +44 -0
- data/webapp/admin/index.jsp +162 -0
- data/webapp/admin/jquery-1.4.3.min.js +166 -0
- data/webapp/admin/meta.xsl +34 -0
- data/webapp/admin/ping.jsp +52 -0
- data/webapp/admin/ping.xsl +71 -0
- data/webapp/admin/raw-schema.jsp +38 -0
- data/webapp/admin/registry.jsp +107 -0
- data/webapp/admin/registry.xsl +321 -0
- data/webapp/admin/replication/header.jsp +89 -0
- data/webapp/admin/replication/index.jsp +378 -0
- data/webapp/admin/schema.jsp +690 -0
- data/webapp/admin/solr-admin.css +215 -0
- data/webapp/admin/solr_small.png +0 -0
- data/webapp/admin/stats.jsp +92 -0
- data/webapp/admin/stats.xsl +220 -0
- data/webapp/admin/tabular.xsl +141 -0
- data/webapp/admin/threaddump.jsp +110 -0
- data/webapp/admin/threaddump.xsl +103 -0
- data/webapp/favicon.ico +0 -0
- data/webapp/index.jsp +49 -0
- metadata +217 -0
@@ -0,0 +1,321 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!--
|
3
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
4
|
+
contributor license agreements. See the NOTICE file distributed with
|
5
|
+
this work for additional information regarding copyright ownership.
|
6
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
7
|
+
(the "License"); you may not use this file except in compliance with
|
8
|
+
the License. You may obtain a copy of the License at
|
9
|
+
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
|
12
|
+
Unless required by applicable law or agreed to in writing, software
|
13
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
See the License for the specific language governing permissions and
|
16
|
+
limitations under the License.
|
17
|
+
-->
|
18
|
+
<!-- $Id: registry.xsl 1075192 2011-02-28 00:50:09Z uschindler $ -->
|
19
|
+
<!-- $URL: https://svn.apache.org/repos/asf/lucene/dev/branches/branch_3x/solr/webapp/web/admin/registry.xsl $ -->
|
20
|
+
|
21
|
+
<xsl:stylesheet
|
22
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
23
|
+
version="1.0">
|
24
|
+
|
25
|
+
|
26
|
+
<xsl:output
|
27
|
+
method="html"
|
28
|
+
encoding="utf-8"
|
29
|
+
media-type="text/html"
|
30
|
+
indent="yes"
|
31
|
+
doctype-public="-//W3C//DTD HTML 4.01//EN"
|
32
|
+
doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
|
33
|
+
|
34
|
+
|
35
|
+
<xsl:template match="/">
|
36
|
+
<html>
|
37
|
+
<head>
|
38
|
+
<link rel="stylesheet" type="text/css" href="solr-admin.css"></link>
|
39
|
+
<link rel="icon" href="favicon.ico" type="image/ico"></link>
|
40
|
+
<link rel="shortcut icon" href="favicon.ico" type="image/ico"></link>
|
41
|
+
<title>Solr Info</title>
|
42
|
+
</head>
|
43
|
+
<body>
|
44
|
+
<a href=".">
|
45
|
+
<img border="0" align="right" height="78" width="142" src="solr_small.png" alt="Apache Solr">
|
46
|
+
</img>
|
47
|
+
</a>
|
48
|
+
<h1>Solr Info (<xsl:value-of select="solr/schema" />)</h1>
|
49
|
+
<xsl:value-of select="solr/host" />
|
50
|
+
<br clear="all" />
|
51
|
+
<xsl:apply-templates/>
|
52
|
+
<br /><br />
|
53
|
+
<a href=".">Return to Admin Page</a>
|
54
|
+
</body>
|
55
|
+
</html>
|
56
|
+
</xsl:template>
|
57
|
+
|
58
|
+
<xsl:template match="solr">
|
59
|
+
<table>
|
60
|
+
<tr>
|
61
|
+
<td>
|
62
|
+
<H3>Category</H3>
|
63
|
+
</td>
|
64
|
+
<td>
|
65
|
+
[<a href="#core">Core</a>]
|
66
|
+
[<a href="#cache">Cache</a>]
|
67
|
+
[<a href="#query">Query</a>]
|
68
|
+
[<a href="#update">Update</a>]
|
69
|
+
[<a href="#highlighting">Highlighting</a>]
|
70
|
+
[<a href="#other">Other</a>]
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
<tr><td></td>
|
74
|
+
<td>Solr Specification Version:
|
75
|
+
<xsl:value-of select="solr-spec-version" />
|
76
|
+
</td>
|
77
|
+
</tr>
|
78
|
+
<tr><td></td>
|
79
|
+
<td>Solr Implementation Version:
|
80
|
+
<xsl:value-of select="solr-impl-version" />
|
81
|
+
</td>
|
82
|
+
</tr>
|
83
|
+
<tr><td></td>
|
84
|
+
<td>Lucene Specification Version:
|
85
|
+
<xsl:value-of select="lucene-spec-version" />
|
86
|
+
</td>
|
87
|
+
</tr>
|
88
|
+
<tr><td></td>
|
89
|
+
<td>Lucene Implementation Version:
|
90
|
+
<xsl:value-of select="lucene-impl-version" />
|
91
|
+
</td>
|
92
|
+
</tr>
|
93
|
+
<tr>
|
94
|
+
<td>
|
95
|
+
</td>
|
96
|
+
<td>
|
97
|
+
Current Time: <xsl:value-of select="now" />
|
98
|
+
</td>
|
99
|
+
</tr>
|
100
|
+
<tr>
|
101
|
+
<td>
|
102
|
+
</td>
|
103
|
+
<td>
|
104
|
+
Server Start Time:<xsl:value-of select="start" />
|
105
|
+
</td>
|
106
|
+
</tr>
|
107
|
+
</table>
|
108
|
+
<xsl:apply-templates/>
|
109
|
+
</xsl:template>
|
110
|
+
|
111
|
+
<xsl:template match="solr/*" priority="-1" />
|
112
|
+
|
113
|
+
<xsl:template match="solr/solr-info">
|
114
|
+
<xsl:apply-templates/>
|
115
|
+
</xsl:template>
|
116
|
+
|
117
|
+
<xsl:template match="solr/solr-info/CORE">
|
118
|
+
<br />
|
119
|
+
<a name="core"><h2>Core</h2></a>
|
120
|
+
<table>
|
121
|
+
<tr>
|
122
|
+
<td align="right">
|
123
|
+
 
|
124
|
+
</td>
|
125
|
+
<td>
|
126
|
+
</td>
|
127
|
+
</tr>
|
128
|
+
<xsl:apply-templates/>
|
129
|
+
</table>
|
130
|
+
</xsl:template>
|
131
|
+
|
132
|
+
<xsl:template match="solr/solr-info/CORE/entry">
|
133
|
+
<xsl:for-each select="*">
|
134
|
+
<tr>
|
135
|
+
<td align="right">
|
136
|
+
<strong><xsl:value-of select="name()"/>: </strong>
|
137
|
+
</td>
|
138
|
+
<td>
|
139
|
+
<tt><xsl:value-of select="."/> </tt>
|
140
|
+
</td>
|
141
|
+
</tr>
|
142
|
+
</xsl:for-each>
|
143
|
+
<tr>
|
144
|
+
<td align="right">
|
145
|
+
</td>
|
146
|
+
<td>
|
147
|
+
</td>
|
148
|
+
</tr>
|
149
|
+
</xsl:template>
|
150
|
+
|
151
|
+
<xsl:template match="solr/solr-info/CACHE">
|
152
|
+
<br />
|
153
|
+
<a name="cache"><h2>Cache</h2></a>
|
154
|
+
<table>
|
155
|
+
<tr>
|
156
|
+
<td align="right">
|
157
|
+
 
|
158
|
+
</td>
|
159
|
+
<td>
|
160
|
+
</td>
|
161
|
+
</tr>
|
162
|
+
<xsl:apply-templates/>
|
163
|
+
</table>
|
164
|
+
</xsl:template>
|
165
|
+
|
166
|
+
<xsl:template match="solr/solr-info/CACHE/entry">
|
167
|
+
<xsl:for-each select="*">
|
168
|
+
<tr>
|
169
|
+
<td align="right">
|
170
|
+
<strong><xsl:value-of select="name()"/>: </strong>
|
171
|
+
</td>
|
172
|
+
<td>
|
173
|
+
<tt><xsl:value-of select="."/> </tt>
|
174
|
+
</td>
|
175
|
+
</tr>
|
176
|
+
</xsl:for-each>
|
177
|
+
<tr>
|
178
|
+
<td align="right">
|
179
|
+
</td>
|
180
|
+
<td>
|
181
|
+
</td>
|
182
|
+
</tr>
|
183
|
+
</xsl:template>
|
184
|
+
|
185
|
+
<xsl:template match="solr/solr-info/QUERYHANDLER">
|
186
|
+
<br />
|
187
|
+
<a name="query"><h2>Query Handlers</h2></a>
|
188
|
+
<table>
|
189
|
+
<tr>
|
190
|
+
<td align="right">
|
191
|
+
 
|
192
|
+
</td>
|
193
|
+
<td>
|
194
|
+
</td>
|
195
|
+
</tr>
|
196
|
+
<xsl:apply-templates/>
|
197
|
+
</table>
|
198
|
+
</xsl:template>
|
199
|
+
|
200
|
+
<xsl:template match="solr/solr-info/QUERYHANDLER/entry">
|
201
|
+
<xsl:for-each select="*">
|
202
|
+
<tr>
|
203
|
+
<td align="right">
|
204
|
+
<strong><xsl:value-of select="name()"/>: </strong>
|
205
|
+
</td>
|
206
|
+
<td>
|
207
|
+
<tt><xsl:value-of select="."/> </tt>
|
208
|
+
</td>
|
209
|
+
</tr>
|
210
|
+
</xsl:for-each>
|
211
|
+
<tr>
|
212
|
+
<td align="right">
|
213
|
+
</td>
|
214
|
+
<td>
|
215
|
+
</td>
|
216
|
+
</tr>
|
217
|
+
</xsl:template>
|
218
|
+
|
219
|
+
<xsl:template match="solr/solr-info/UPDATEHANDLER">
|
220
|
+
<br />
|
221
|
+
<a name="update"><h2>Update Handlers</h2></a>
|
222
|
+
<table>
|
223
|
+
<tr>
|
224
|
+
<td align="right">
|
225
|
+
 
|
226
|
+
</td>
|
227
|
+
<td>
|
228
|
+
</td>
|
229
|
+
</tr>
|
230
|
+
<xsl:apply-templates/>
|
231
|
+
</table>
|
232
|
+
</xsl:template>
|
233
|
+
|
234
|
+
<xsl:template match="solr/solr-info/UPDATEHANDLER/entry">
|
235
|
+
<xsl:for-each select="*">
|
236
|
+
<tr>
|
237
|
+
<td align="right">
|
238
|
+
<strong><xsl:value-of select="name()"/>: </strong>
|
239
|
+
</td>
|
240
|
+
<td>
|
241
|
+
<tt><xsl:value-of select="."/> </tt>
|
242
|
+
</td>
|
243
|
+
</tr>
|
244
|
+
</xsl:for-each>
|
245
|
+
<tr>
|
246
|
+
<td align="right">
|
247
|
+
</td>
|
248
|
+
<td>
|
249
|
+
</td>
|
250
|
+
</tr>
|
251
|
+
</xsl:template>
|
252
|
+
<xsl:template match="solr/solr-info/HIGHLIGHTING">
|
253
|
+
<br />
|
254
|
+
<a name="highlighting"><h2>Highlighting</h2></a>
|
255
|
+
<table>
|
256
|
+
<tr>
|
257
|
+
<td align="right">
|
258
|
+
 
|
259
|
+
</td>
|
260
|
+
<td>
|
261
|
+
</td>
|
262
|
+
</tr>
|
263
|
+
<xsl:apply-templates/>
|
264
|
+
</table>
|
265
|
+
</xsl:template>
|
266
|
+
<xsl:template match="solr/solr-info/HIGHLIGHTING/entry">
|
267
|
+
<xsl:for-each select="*">
|
268
|
+
<tr>
|
269
|
+
<td align="right">
|
270
|
+
<strong><xsl:value-of select="name()"/>: </strong>
|
271
|
+
</td>
|
272
|
+
<td>
|
273
|
+
<tt><xsl:value-of select="."/> </tt>
|
274
|
+
</td>
|
275
|
+
</tr>
|
276
|
+
</xsl:for-each>
|
277
|
+
<tr>
|
278
|
+
<td align="right">
|
279
|
+
</td>
|
280
|
+
<td>
|
281
|
+
</td>
|
282
|
+
</tr>
|
283
|
+
</xsl:template>
|
284
|
+
|
285
|
+
|
286
|
+
<xsl:template match="solr/solr-info/OTHER">
|
287
|
+
<br />
|
288
|
+
<a name="other"><h2>Other</h2></a>
|
289
|
+
<table>
|
290
|
+
<tr>
|
291
|
+
<td align="right">
|
292
|
+
 
|
293
|
+
</td>
|
294
|
+
<td>
|
295
|
+
</td>
|
296
|
+
</tr>
|
297
|
+
<xsl:apply-templates/>
|
298
|
+
</table>
|
299
|
+
</xsl:template>
|
300
|
+
|
301
|
+
<xsl:template match="solr/solr-info/OTHER/entry">
|
302
|
+
<xsl:for-each select="*">
|
303
|
+
<tr>
|
304
|
+
<td align="right">
|
305
|
+
<strong><xsl:value-of select="name()"/>: </strong>
|
306
|
+
</td>
|
307
|
+
<td>
|
308
|
+
<tt><xsl:value-of select="."/> </tt>
|
309
|
+
</td>
|
310
|
+
</tr>
|
311
|
+
</xsl:for-each>
|
312
|
+
<tr>
|
313
|
+
<td align="right">
|
314
|
+
</td>
|
315
|
+
<td>
|
316
|
+
</td>
|
317
|
+
</tr>
|
318
|
+
</xsl:template>
|
319
|
+
|
320
|
+
|
321
|
+
</xsl:stylesheet>
|
@@ -0,0 +1,89 @@
|
|
1
|
+
<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
|
2
|
+
<%--
|
3
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
4
|
+
contributor license agreements. See the NOTICE file distributed with
|
5
|
+
this work for additional information regarding copyright ownership.
|
6
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
7
|
+
(the "License"); you may not use this file except in compliance with
|
8
|
+
the License. You may obtain a copy of the License at
|
9
|
+
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
|
12
|
+
Unless required by applicable law or agreed to in writing, software
|
13
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
See the License for the specific language governing permissions and
|
16
|
+
limitations under the License.
|
17
|
+
--%>
|
18
|
+
<!-- $Id: header.jsp 1151947 2011-07-28 18:07:54Z hossman $ -->
|
19
|
+
<%@ page import="org.apache.solr.common.util.NamedList,
|
20
|
+
org.apache.solr.common.util.SimpleOrderedMap,
|
21
|
+
org.apache.solr.request.LocalSolrQueryRequest,
|
22
|
+
org.apache.solr.response.SolrQueryResponse,
|
23
|
+
org.apache.solr.request.SolrRequestHandler,
|
24
|
+
java.util.Map"%>
|
25
|
+
<%@ page import="org.apache.solr.handler.ReplicationHandler" %>
|
26
|
+
<%
|
27
|
+
request.setCharacterEncoding("UTF-8");
|
28
|
+
%>
|
29
|
+
|
30
|
+
<html>
|
31
|
+
<head>
|
32
|
+
|
33
|
+
<%@include file="../_info.jsp" %>
|
34
|
+
|
35
|
+
<script>
|
36
|
+
var host_name="<%= hostname %>"
|
37
|
+
</script>
|
38
|
+
|
39
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
40
|
+
<link rel="stylesheet" type="text/css" href="../solr-admin.css">
|
41
|
+
<link rel="icon" href="../favicon.ico" type="image/ico" />
|
42
|
+
<link rel="shortcut icon" href="../favicon.ico" type="image/ico" />
|
43
|
+
<title>Solr replication admin page</title>
|
44
|
+
<script type="text/javascript" src="../jquery-1.4.3.min.js"></script>
|
45
|
+
|
46
|
+
<%!
|
47
|
+
public NamedList executeCommand(String command, SolrCore core, SolrRequestHandler rh){
|
48
|
+
NamedList namedlist = new SimpleOrderedMap();
|
49
|
+
namedlist.add("command", command);
|
50
|
+
LocalSolrQueryRequest solrqreq = new LocalSolrQueryRequest(core, namedlist);
|
51
|
+
SolrQueryResponse rsp = new SolrQueryResponse();
|
52
|
+
core.execute(rh, solrqreq, rsp);
|
53
|
+
namedlist = rsp.getValues();
|
54
|
+
return namedlist;
|
55
|
+
}
|
56
|
+
%>
|
57
|
+
|
58
|
+
<%
|
59
|
+
final Map<String,SolrRequestHandler> all = core.getRequestHandlers(ReplicationHandler.class);
|
60
|
+
if(all.isEmpty()){
|
61
|
+
response.sendError( 404, "No ReplicationHandler registered" );
|
62
|
+
return;
|
63
|
+
}
|
64
|
+
|
65
|
+
// :HACK: we should be more deterministic if multiple instances
|
66
|
+
final SolrRequestHandler rh = all.values().iterator().next();
|
67
|
+
|
68
|
+
NamedList namedlist = executeCommand("details",core,rh);
|
69
|
+
NamedList detailsMap = (NamedList)namedlist.get("details");
|
70
|
+
%>
|
71
|
+
</head>
|
72
|
+
|
73
|
+
<body>
|
74
|
+
<a href=".."><img border="0" align="right" height="78" width="142" src="../solr_small.png" alt="Solr"></a>
|
75
|
+
<h1>Solr replication (<%= collectionName %>)
|
76
|
+
|
77
|
+
<%
|
78
|
+
if(detailsMap != null){
|
79
|
+
if( "true".equals(detailsMap.get("isMaster")) && "true".equals(detailsMap.get("isSlave")))
|
80
|
+
out.println(" Master & Slave");
|
81
|
+
else if("true".equals(detailsMap.get("isMaster")))
|
82
|
+
out.println(" Master");
|
83
|
+
else if("true".equals(detailsMap.get("isSlave")))
|
84
|
+
out.println(" Slave");
|
85
|
+
}
|
86
|
+
%></h1>
|
87
|
+
|
88
|
+
<%= hostname %>:<%= port %><br/>
|
89
|
+
cwd=<%= cwd %> SolrHome=<%= solrHome %>
|
@@ -0,0 +1,378 @@
|
|
1
|
+
<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8" %>
|
2
|
+
<%--
|
3
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
4
|
+
contributor license agreements. See the NOTICE file distributed with
|
5
|
+
this work for additional information regarding copyright ownership.
|
6
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
7
|
+
(the "License"); you may not use this file except in compliance with
|
8
|
+
the License. You may obtain a copy of the License at
|
9
|
+
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
16
|
+
--%>
|
17
|
+
<%@ page import="java.util.Collection" %>
|
18
|
+
<%@ page import="java.util.Date" %>
|
19
|
+
|
20
|
+
|
21
|
+
<%-- do a verbatim include so we can use the local vars --%>
|
22
|
+
<%@include file="header.jsp"%>
|
23
|
+
|
24
|
+
<br clear="all" />
|
25
|
+
(<a href="http://wiki.apache.org/solr/SolrReplication">What Is This Page?</a>)
|
26
|
+
<br clear="all" />
|
27
|
+
<table>
|
28
|
+
|
29
|
+
<%
|
30
|
+
|
31
|
+
final SolrCore solrcore = core;
|
32
|
+
|
33
|
+
%>
|
34
|
+
<%
|
35
|
+
NamedList slave = null, master = null;
|
36
|
+
if (detailsMap != null)
|
37
|
+
if ("true".equals(detailsMap.get("isSlave")))
|
38
|
+
if(detailsMap.get("slave") != null){
|
39
|
+
slave = (NamedList)detailsMap.get("slave");%>
|
40
|
+
<tr>
|
41
|
+
<td>
|
42
|
+
<strong>Master</strong>
|
43
|
+
</td>
|
44
|
+
<td>
|
45
|
+
<%=slave.get("masterUrl")%>
|
46
|
+
<%
|
47
|
+
NamedList nl = (NamedList) slave.get("masterDetails");
|
48
|
+
if(nl == null)
|
49
|
+
out.print(" - <b>Unreachable</b>");
|
50
|
+
%>
|
51
|
+
</td>
|
52
|
+
</tr>
|
53
|
+
<%
|
54
|
+
if (nl != null) {
|
55
|
+
nl = (NamedList) nl.get("master");
|
56
|
+
if(nl != null){
|
57
|
+
%>
|
58
|
+
<tr>
|
59
|
+
<td>
|
60
|
+
</td>
|
61
|
+
<td>Latest Index Version:<%=nl.get("indexVersion")%>, Generation: <%=nl.get("generation")%>
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
<tr>
|
65
|
+
<td></td>
|
66
|
+
<td>Replicatable Index Version:<%=nl.get("replicatableIndexVersion")%>, Generation: <%=nl.get("replicatableGeneration")%>
|
67
|
+
</td>
|
68
|
+
</tr>
|
69
|
+
<%
|
70
|
+
}
|
71
|
+
}%>
|
72
|
+
|
73
|
+
<tr>
|
74
|
+
<td>
|
75
|
+
<strong>Poll Interval</strong>
|
76
|
+
</td>
|
77
|
+
<td>
|
78
|
+
<%=slave.get("pollInterval")%>
|
79
|
+
</td>
|
80
|
+
</tr>
|
81
|
+
<%}%>
|
82
|
+
|
83
|
+
<tr>
|
84
|
+
<td>
|
85
|
+
<strong>Local Index</strong>
|
86
|
+
</td>
|
87
|
+
<td>
|
88
|
+
<%
|
89
|
+
if (detailsMap != null)
|
90
|
+
out.println("Index Version: " + detailsMap.get("indexVersion") + ", Generation: " + detailsMap.get("generation"));
|
91
|
+
%>
|
92
|
+
</td>
|
93
|
+
</tr>
|
94
|
+
|
95
|
+
<tr>
|
96
|
+
<td>
|
97
|
+
</td>
|
98
|
+
<td>
|
99
|
+
<% if (null != core.getIndexDir()) {
|
100
|
+
File dir = new File(core.getIndexDir());
|
101
|
+
out.println("Location: " + dir.getCanonicalPath());
|
102
|
+
}%>
|
103
|
+
</td>
|
104
|
+
</tr>
|
105
|
+
|
106
|
+
<tr>
|
107
|
+
<td></td>
|
108
|
+
<td><% if (detailsMap != null)
|
109
|
+
out.println("Size: " + detailsMap.get("indexSize"));
|
110
|
+
%>
|
111
|
+
</td>
|
112
|
+
</tr>
|
113
|
+
|
114
|
+
<%
|
115
|
+
if (detailsMap != null)
|
116
|
+
if ("true".equals(detailsMap.get("isMaster")))
|
117
|
+
if(detailsMap.get("master") != null){
|
118
|
+
master = (NamedList) detailsMap.get("master");
|
119
|
+
%>
|
120
|
+
|
121
|
+
<tr>
|
122
|
+
<td></td>
|
123
|
+
<td>
|
124
|
+
<%out.println("Config Files To Replicate: " + master.get("confFiles"));%>
|
125
|
+
</td>
|
126
|
+
</tr>
|
127
|
+
|
128
|
+
<tr>
|
129
|
+
<td></td>
|
130
|
+
<td>
|
131
|
+
<%out.println("Trigger Replication On: " + master.get("replicateAfter")); %>
|
132
|
+
</td>
|
133
|
+
</tr>
|
134
|
+
<%}%>
|
135
|
+
|
136
|
+
<%
|
137
|
+
if ("true".equals(detailsMap.get("isSlave")))
|
138
|
+
if (slave != null) {%>
|
139
|
+
<tr>
|
140
|
+
<td>
|
141
|
+
</td>
|
142
|
+
<td>
|
143
|
+
<%
|
144
|
+
out.println("Times Replicated Since Startup: " + slave.get("timesIndexReplicated"));
|
145
|
+
%>
|
146
|
+
</td>
|
147
|
+
</tr>
|
148
|
+
|
149
|
+
<tr>
|
150
|
+
<td>
|
151
|
+
</td>
|
152
|
+
<td>
|
153
|
+
<%
|
154
|
+
out.println("Previous Replication Done At: " + slave.get("indexReplicatedAt"));
|
155
|
+
%>
|
156
|
+
</td>
|
157
|
+
</tr>
|
158
|
+
|
159
|
+
<tr>
|
160
|
+
<td>
|
161
|
+
</td>
|
162
|
+
<td>
|
163
|
+
<%
|
164
|
+
out.println("Config Files Replicated At: " + slave.get("confFilesReplicatedAt"));
|
165
|
+
%>
|
166
|
+
</td>
|
167
|
+
</tr>
|
168
|
+
|
169
|
+
<tr>
|
170
|
+
<td>
|
171
|
+
</td>
|
172
|
+
<td>
|
173
|
+
<%
|
174
|
+
out.println("Config Files Replicated: " + slave.get("confFilesReplicated"));
|
175
|
+
%>
|
176
|
+
</td>
|
177
|
+
</tr>
|
178
|
+
|
179
|
+
<tr>
|
180
|
+
<td>
|
181
|
+
</td>
|
182
|
+
<td>
|
183
|
+
<%
|
184
|
+
out.println("Times Config Files Replicated Since Startup: " + slave.get("timesConfigReplicated"));
|
185
|
+
%>
|
186
|
+
</td>
|
187
|
+
</tr>
|
188
|
+
|
189
|
+
<tr>
|
190
|
+
<td>
|
191
|
+
</td>
|
192
|
+
<td>
|
193
|
+
<%
|
194
|
+
if (slave.get("nextExecutionAt") != null)
|
195
|
+
if (slave.get("nextExecutionAt") != "")
|
196
|
+
out.println("Next Replication Cycle At: " + slave.get("nextExecutionAt"));
|
197
|
+
else if ("true".equals(slave.get("isPollingDisabled")))
|
198
|
+
out.println("Next Replication Cycle At: Polling disabled.");
|
199
|
+
else {
|
200
|
+
NamedList nl1 = (NamedList) slave.get("masterDetails");
|
201
|
+
if(nl1 != null){
|
202
|
+
NamedList nl2 = (NamedList) nl1.get("master");
|
203
|
+
if(nl2 != null)
|
204
|
+
out.println("Next Replication Cycle At: After " + nl2.get("replicateAfter") + " on master.");
|
205
|
+
}
|
206
|
+
}
|
207
|
+
%>
|
208
|
+
</td>
|
209
|
+
</tr>
|
210
|
+
|
211
|
+
<%
|
212
|
+
if ("true".equals(slave.get("isReplicating"))) {
|
213
|
+
%>
|
214
|
+
<tr>
|
215
|
+
<td><strong>Current Replication Status</strong>
|
216
|
+
|
217
|
+
<td>
|
218
|
+
<%out.println("Start Time: " + slave.get("replicationStartTime"));%>
|
219
|
+
</td>
|
220
|
+
</tr>
|
221
|
+
|
222
|
+
<tr>
|
223
|
+
<td></td>
|
224
|
+
<td>
|
225
|
+
<%
|
226
|
+
out.println("Files Downloaded: " + slave.get("numFilesDownloaded") + " / " + slave.get("numFilesToDownload"));%>
|
227
|
+
</td>
|
228
|
+
</tr>
|
229
|
+
|
230
|
+
<tr>
|
231
|
+
<td></td>
|
232
|
+
<td>
|
233
|
+
<%
|
234
|
+
out.println("Downloaded: " + slave.get("bytesDownloaded") + " / " + slave.get("bytesToDownload") + " [" + slave.get("totalPercent") + "%]");%>
|
235
|
+
</td>
|
236
|
+
</tr>
|
237
|
+
|
238
|
+
<tr>
|
239
|
+
<td></td>
|
240
|
+
<td>
|
241
|
+
<%
|
242
|
+
out.println("Downloading File: " + slave.get("currentFile") + ", Downloaded: " + slave.get("currentFileSizeDownloaded") + " / " + slave.get("currentFileSize") + " [" + slave.get("currentFileSizePercent") + "%]");%>
|
243
|
+
</td>
|
244
|
+
</tr>
|
245
|
+
|
246
|
+
<tr>
|
247
|
+
<td></td>
|
248
|
+
<td>
|
249
|
+
<%
|
250
|
+
out.println("Time Elapsed: " + slave.get("timeElapsed") + ", Estimated Time Remaining: " + slave.get("timeRemaining") + ", Speed: " + slave.get("downloadSpeed") + "/s");%>
|
251
|
+
</td>
|
252
|
+
</tr>
|
253
|
+
<%}%>
|
254
|
+
|
255
|
+
<tr>
|
256
|
+
<td><strong>Controls</strong>
|
257
|
+
</td>
|
258
|
+
<td><%
|
259
|
+
String pollVal = request.getParameter("poll");
|
260
|
+
if (pollVal != null)
|
261
|
+
if (pollVal.equals("disable"))
|
262
|
+
executeCommand("disablepoll", core, rh);
|
263
|
+
else if (pollVal.equals("enable"))
|
264
|
+
executeCommand("enablepoll", core, rh);
|
265
|
+
if(slave != null)
|
266
|
+
if ("false".equals(slave.get("isPollingDisabled"))) {
|
267
|
+
%>
|
268
|
+
|
269
|
+
<form name=polling method="POST" action="./index.jsp" accept-charset="UTF-8">
|
270
|
+
<input name="poll" type="hidden" value="disable">
|
271
|
+
<input class="stdbutton" type="submit" value="Disable Poll">
|
272
|
+
</form>
|
273
|
+
|
274
|
+
<%}%>
|
275
|
+
<%
|
276
|
+
if(slave != null)
|
277
|
+
if ("true".equals(slave.get("isPollingDisabled"))) {
|
278
|
+
%>
|
279
|
+
|
280
|
+
<form name=polling method="POST" action="./index.jsp" accept-charset="UTF-8">
|
281
|
+
<input name="poll" type="hidden" value="enable">
|
282
|
+
<input class="stdbutton" type="submit" value="Enable Poll">
|
283
|
+
</form>
|
284
|
+
<%
|
285
|
+
}
|
286
|
+
%>
|
287
|
+
|
288
|
+
</td>
|
289
|
+
</tr>
|
290
|
+
|
291
|
+
<tr>
|
292
|
+
<td></td>
|
293
|
+
<td>
|
294
|
+
<form name=replicate method="POST" action="./index.jsp" accept-charset="UTF-8">
|
295
|
+
<input name="replicate" type="hidden" value="now">
|
296
|
+
<input name="replicateButton" class="stdbutton" type="submit" value="Replicate Now">
|
297
|
+
</form>
|
298
|
+
<%
|
299
|
+
if(slave != null)
|
300
|
+
if ("true".equals(slave.get("isReplicating"))) {
|
301
|
+
%>
|
302
|
+
<script type="text/javascript">
|
303
|
+
document["replicate"].replicateButton.disabled = true;
|
304
|
+
document["replicate"].replicateButton.className = 'stdbuttondis';
|
305
|
+
</script>
|
306
|
+
<form name=abort method="POST" action="./index.jsp" accept-charset="UTF-8">
|
307
|
+
<input name="abort" type="hidden" value="stop">
|
308
|
+
<input name="abortButton" class="stdbutton" type="submit" value="Abort">
|
309
|
+
</form>
|
310
|
+
|
311
|
+
<%} else {%>
|
312
|
+
<script type="text/javascript">
|
313
|
+
document["replicate"].replicateButton.disabled = false;
|
314
|
+
document["replicate"].replicateButton.className = 'stdbutton';
|
315
|
+
</script>
|
316
|
+
<%
|
317
|
+
}
|
318
|
+
String replicateParam = request.getParameter("replicate");
|
319
|
+
String abortParam = request.getParameter("abort");
|
320
|
+
if (replicateParam != null)
|
321
|
+
if (replicateParam.equals("now")) {
|
322
|
+
executeCommand("fetchindex", solrcore, rh);
|
323
|
+
}
|
324
|
+
if (abortParam != null)
|
325
|
+
if (abortParam.equals("stop")) {
|
326
|
+
executeCommand("abortfetch", solrcore, rh);
|
327
|
+
}
|
328
|
+
%>
|
329
|
+
</td>
|
330
|
+
|
331
|
+
</tr>
|
332
|
+
|
333
|
+
<%}%>
|
334
|
+
|
335
|
+
<%-- List the cores (that arent this one) so we can switch --%>
|
336
|
+
<% org.apache.solr.core.CoreContainer cores = (org.apache.solr.core.CoreContainer) request.getAttribute("org.apache.solr.CoreContainer");
|
337
|
+
if (cores != null) {
|
338
|
+
Collection<String> names = cores.getCoreNames();
|
339
|
+
if (names.size() > 1) {%>
|
340
|
+
<tr>
|
341
|
+
<td><strong>Cores:</strong><br></td>
|
342
|
+
<td><%
|
343
|
+
for (String name : names) {
|
344
|
+
%>[<a href="../../../<%=name%>/admin/index.jsp"><%=name%>
|
345
|
+
</a>]<%
|
346
|
+
}%></td>
|
347
|
+
</tr>
|
348
|
+
<%
|
349
|
+
}
|
350
|
+
}%>
|
351
|
+
|
352
|
+
|
353
|
+
</table>
|
354
|
+
<P>
|
355
|
+
|
356
|
+
<p>
|
357
|
+
|
358
|
+
<table>
|
359
|
+
<tr>
|
360
|
+
<td>
|
361
|
+
</td>
|
362
|
+
<td>
|
363
|
+
Current Time: <%= new Date() %>
|
364
|
+
</td>
|
365
|
+
</tr>
|
366
|
+
<tr>
|
367
|
+
<td>
|
368
|
+
</td>
|
369
|
+
<td>
|
370
|
+
Server Start At: <%= new Date(core.getStartTime()) %>
|
371
|
+
</td>
|
372
|
+
</tr>
|
373
|
+
</table>
|
374
|
+
|
375
|
+
<br>
|
376
|
+
<a href="..">Return to Admin Page</a>
|
377
|
+
</body>
|
378
|
+
</html>
|