Review Board 1.7.22


Disabling dual checkpointing on windows

Review Request #15017 - Created Oct. 29, 2013 and updated

Roshan Naik
flume-1.5
FLUME-2224
Reviewers
Flume
flume-git
Disabling dual checkpointing on windows in code and skipping related tests.

 
flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannel.java
Revision 5203ca1 New Change
[20] 101 lines
[+20] [+] public synchronized void setName(String name) {
102
    super.setName(name);
102
    super.setName(name);
103
  }
103
  }
104

    
   
104

   
105
  @Override
105
  @Override
106
  public void configure(Context context) {
106
  public void configure(Context context) {
107

    
   

   
108
    useDualCheckpoints = context.getBoolean(
107
    useDualCheckpoints = context.getBoolean(
109
        FileChannelConfiguration.USE_DUAL_CHECKPOINTS,
108
        FileChannelConfiguration.USE_DUAL_CHECKPOINTS,
110
        FileChannelConfiguration.DEFAULT_USE_DUAL_CHECKPOINTS);
109
        FileChannelConfiguration.DEFAULT_USE_DUAL_CHECKPOINTS);

    
   
110
    String os = System.getProperty("os.name").toLowerCase();

    
   
111
    if(os.toLowerCase().startsWith("windows") && useDualCheckpoints==true) {

    
   
112
      useDualCheckpoints = false;

    
   
113
      LOG.warn("Dual checkpoints is currently not supported on Windows");

    
   
114
    }

    
   
115

   
111
    String homePath = System.getProperty("user.home").replace('\\', '/');
116
    String homePath = System.getProperty("user.home").replace('\\', '/');
112

    
   
117

   
113
    String strCheckpointDir =
118
    String strCheckpointDir =
114
        context.getString(FileChannelConfiguration.CHECKPOINT_DIR,
119
        context.getString(FileChannelConfiguration.CHECKPOINT_DIR,
115
            homePath + "/.flume/file-channel/checkpoint");
120
            homePath + "/.flume/file-channel/checkpoint");
[+20] [20] 480 lines
flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Log.java
Revision 579ee35 New Change
 
flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestFileChannelRestart.java
Revision d16f3d5 New Change
 
  1. flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/FileChannel.java: Loading...
  2. flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Log.java: Loading...
  3. flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestFileChannelRestart.java: Loading...