Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
knightliao committed Sep 27, 2021
1 parent 11d0888 commit f95a68d
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 125 deletions.
6 changes: 0 additions & 6 deletions disconf-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,6 @@

<!-- log dependencies -->

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
Expand Down
22 changes: 1 addition & 21 deletions disconf-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.1</version>
<version>4.5.13</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -86,26 +86,6 @@
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- test dependencies -->

<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/**
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
*
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -20,13 +19,14 @@
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;

import org.apache.log4j.Logger;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.ZooDefs;
import org.apache.zookeeper.ZooKeeper;
import org.apache.zookeeper.data.ACL;
import org.apache.zookeeper.data.Stat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* A base class for protocol implementations which provides a number of higher
Expand All @@ -35,7 +35,7 @@
* {@link #retryOperation(ZooKeeperOperation)}
*/
class ProtocolSupport {
private static final Logger LOG = Logger.getLogger(ProtocolSupport.class);
private static final Logger LOG = LoggerFactory.getLogger(ProtocolSupport.class);

protected final ZooKeeper zookeeper;
private AtomicBoolean closed = new AtomicBoolean(false);
Expand Down Expand Up @@ -128,7 +128,7 @@ protected Object retryOperation(ZooKeeperOperation operation) throws KeeperExcep
exception = e;
}
LOG.debug("Attempt " + i + " failed with connection loss so " +
"attempting to reconnect: " + e, e);
"attempting to reconnect: " + e, e);
retryDelay(i);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/**
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
*
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -23,13 +22,14 @@
import java.util.SortedSet;
import java.util.TreeSet;

import org.apache.log4j.Logger;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.ZooKeeper;
import org.apache.zookeeper.data.ACL;
import org.apache.zookeeper.data.Stat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* A <a href="package.html">protocol to implement an exclusive
Expand All @@ -40,7 +40,7 @@
* by calling {@link #isOwner()}
*/
public class WriteLock extends ProtocolSupport {
private static final Logger LOG = Logger.getLogger(WriteLock.class);
private static final Logger LOG = LoggerFactory.getLogger(WriteLock.class);

private final String dir;
private String id;
Expand Down Expand Up @@ -132,7 +132,7 @@ public boolean execute() throws KeeperException, InterruptedException {
} catch (KeeperException e) {
LOG.warn("Caught: " + e, e);
throw (RuntimeException) new RuntimeException(e.getMessage()).
initCause(e);
initCause(e);
} finally {
if (callback != null) {
callback.lockReleased();
Expand All @@ -151,7 +151,7 @@ private class LockWatcher implements Watcher {
public void process(WatchedEvent event) {
// lets either become the leader or watch the new/updated node
LOG.debug("Watcher fired on path: " + event.getPath() + " state: " +
event.getState() + " type " + event.getType());
event.getState() + " type " + event.getType());
try {
lock();
} catch (Exception e) {
Expand All @@ -177,7 +177,7 @@ private class LockZooKeeperOperation implements ZooKeeperOperation {
* @throws InterruptedException
*/
private void findPrefixInChildren(String prefix, ZooKeeper zookeeper, String dir)
throws KeeperException, InterruptedException {
throws KeeperException, InterruptedException {
List<String> names = zookeeper.getChildren(dir, false);
for (String name : names) {
if (name.startsWith(prefix)) {
Expand Down Expand Up @@ -218,7 +218,7 @@ public boolean execute() throws KeeperException, InterruptedException {
List<String> names = zookeeper.getChildren(dir, false);
if (names.isEmpty()) {
LOG.warn("No children in: " + dir + " when we've just " +
"created one! Lets recreate it...");
"created one! Lets recreate it...");
// lets force the recreation of the id
id = null;
} else {
Expand All @@ -240,7 +240,7 @@ public boolean execute() throws KeeperException, InterruptedException {
return Boolean.FALSE;
} else {
LOG.warn("Could not find the" +
" stats for less than me: " + lastChildName.getName());
" stats for less than me: " + lastChildName.getName());
}
} else {
if (isOwner()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/**
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
*
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -17,7 +16,8 @@
*/
package org.apache.zookeeper.recipes.lock;

import org.apache.log4j.Logger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Represents an ephemeral znode name which has an ordered sequence number
Expand All @@ -27,7 +27,7 @@ class ZNodeName implements Comparable<ZNodeName> {
private final String name;
private String prefix;
private int sequence = -1;
private static final Logger LOG = Logger.getLogger(ZNodeName.class);
private static final Logger LOG = LoggerFactory.getLogger(ZNodeName.class);

public ZNodeName(String name) {
if (name == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
public class BaseCoreTestCase {

@ClassRule
@Rule
public static WireMockClassRule wireMockRule = new WireMockClassRule(RemoteMockServer.PORT);

protected static final Logger LOGGER = LoggerFactory.getLogger(BaseCoreTestCase.class);
Expand Down
28 changes: 0 additions & 28 deletions disconf-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -276,34 +276,6 @@

<!-- log -->

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
Expand Down
64 changes: 16 additions & 48 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>

<!-- JAVA环境 -->
<java.version>1.6</java.version>
<source.version>1.6</source.version>
<target.version>1.6</target.version>
<java.version>1.7</java.version>
<source.version>1.7</source.version>
<target.version>1.7</target.version>
<spring.version>4.1.7.RELEASE</spring.version>
<spring.amqp.version>1.4.5.RELEASE</spring.amqp.version>
<junit.version>4.10</junit.version>
<junit.version>4.12</junit.version>
<jsp.version>2.0</jsp.version>
<servlet.version>2.5</servlet.version>
<cglib.version>2.2.2</cglib.version>
Expand Down Expand Up @@ -96,7 +96,7 @@
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.6</version>
<version>1.9.4</version>
</dependency>

<dependency>
Expand All @@ -120,13 +120,13 @@
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.2.1</version>
<version>1.3.3</version>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.4</version>
<version>2.7</version>
</dependency>

<dependency>
Expand All @@ -152,7 +152,7 @@
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.3.6</version>
<version>3.4.14</version>
<exclusions>
<exclusion>
<groupId>com.sun.jmx</groupId>
Expand Down Expand Up @@ -463,48 +463,16 @@

<!-- log -->

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>1.7.6</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.6</version>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.2.0</version>
<version>1.7.25</version>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.0</version>
</dependency>

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<exclusions>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
</exclusions>
<version>1.2.5</version>
</dependency>

<dependency>
Expand All @@ -517,12 +485,6 @@
<classifier>standalone</classifier>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.4.3</version>
</dependency>

</dependencies>
</dependencyManagement>

Expand Down Expand Up @@ -683,6 +645,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<!-- jdk1.8要加上,1.7要去掉,否则会报错 -->
<additionalJOptions>
<additionalJOption>-Xdoclint:none</additionalJOption>
</additionalJOptions>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down

1 comment on commit f95a68d

@xiehf319
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

要开始维护了吗

Please sign in to comment.